Add an HTML body to a message object.

html(
  msg,
  content,
  disposition = "inline",
  charset = "utf-8",
  encoding = "quoted-printable",
  css_files = c(),
  interpolate = TRUE,
  .open = "{{",
  .close = "}}",
  .envir = NULL
)

Arguments

msg

A message object.

content

A string of message content.

disposition

How content is presented (Content-Disposition).

charset

How content is encoded.

encoding

How content is transformed to ASCII (Content-Transfer-Encoding).

css_files

Extra CSS files.

interpolate

Whether or not to interpolate into input using glue.

.open

The opening delimiter.

.close

The closing delimiter.

.envir

Environment used for glue interpolation. Defaults to parent.frame().

Value

A message object.

See also

Examples

library(magrittr) # Inline HTML message. envelope() %>% html("<b>Hello!</b>") # Read HTML message from a file. htmlfile <- tempfile(fileext = ".html") cat("<p>Hello!</p>\n", file = htmlfile) envelope() %>% html(htmlfile)