Add an HTML body to a message object.
Usage
html(
  msg,
  content,
  disposition = "inline",
  charset = "utf-8",
  encoding = NA,
  css_files = c(),
  language = FALSE,
  interpolate = TRUE,
  .open = "{{",
  .close = "}}",
  .envir = NULL
)Arguments
- msg
- A message object. 
- content
- A string of message content. 
- disposition
- Should the content be displayed inline or as an attachment? Valid options are - "inline"and- "attachment". If set to- NAthen will guess appropriate value.
- charset
- What character set is used. Most often either - "UTF-8"or- "ISO-8859-1".
- encoding
- How content is transformed to ASCII. Options are - "7bit",- "quoted-printable"and- "base64". Use- NAor- NULLfor no (or "identity") encoding.
- css_files
- Extra CSS files. 
- language
- Language of content. If - FALSEthen will not include language field. If- TRUEthen will attempt to auto-detect language. Otherwise will use the specified language.
- interpolate
- Whether or not to interpolate into input using glue. 
- .open
- The opening delimiter. 
- .close
- The closing delimiter. 
- .envir
- Environment used for - glueinterpolation. Defaults to- parent.frame().
Examples
# 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)
# You can pass a vector of character. Components will be separated by a
# "\n".
envelope() %>% html(c("<b>Hello</b>", "<p>World!</p>"))
# You can also pass a tagList from {htmltools}.
if (requireNamespace("htmltools", quietly = TRUE)) {
  library(htmltools)
  envelope() %>% html(tagList(h2("Hello"), p("World!")))
}