The compose_email()
function allows us to easily create an email message.
We can incorporate character vectors into the message body, the header, or
the footer.
compose_email( body = NULL, header = NULL, footer = NULL, title = NULL, ..., template = blastula_template )
header, body, footer | The three layout sections for an email message
(ordered from top to bottom). Markdown text can be supplied to each of
these by using the |
---|---|
title | The title of the email message. This is not the subject but the HTML title text which may appear in limited circumstances. |
... | Additional arguments to pass to the |
template | An email template function to use. The default is
|
An email_message
object.
# Create a simple email message using # Markdown-formatted text in the `body` # and `footer` sections with the `md()` # text helper function email <- compose_email( body = md( " ## Hello! This is an email message that was generated by the blastula package. We can use **Markdown** formatting with the `md()` function. Cheers, The blastula team "), footer = md( " sent via the [blastula](https://rstudio.github.io/blastula) R package ") ) # The email message can always be # previewed by calling the object if (interactive()) email