Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

prepare_test_message

Prepare a email test message object


Description

Create an email test message object, which is helpful for sending a test message with the smtp_send() function.

Usage

prepare_test_message(incl_ggplot = FALSE, incl_image = FALSE)

Arguments

incl_ggplot

An option to include a ggplot plot within the body of the test message. This requires that the ggplot2 package is installed. By default, this is FALSE.

incl_image

An option to include a test image within the body of the test message. By default, this is FALSE.

Value

An email_message object.

Examples

# Create a credentials file to send
# a test message via Gmail's SMTP
# (this file is named "gmail_secret")

# create_smtp_creds_file(
#   file = "gmail_secret",
#   user = "sender@email.com",
#   provider = "gmail"
# )

# Send oneself a test message to
# test these new SMTP settings and
# to ensure that the message appears
# correctly in the email client

# prepare_test_message() %>%
#   smtp_send(
#     from = "sender@email.com",
#     to = "sender@email.com",
#     subject = "Test Message",
#     credentials = creds_file(
#       file = "gmail_secret"
#       )
#     )

blastula

Easily Send HTML Email Messages

v0.3.2
MIT + file LICENSE
Authors
Richard Iannone [aut, cre] (<https://orcid.org/0000-0003-3925-190X>), Joe Cheng [aut], Jeroen Ooms [ctb] (<https://orcid.org/0000-0002-4035-0289>), Ted Goas [cph] (cerberus-meta.html)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.