Create an email test message object, which is helpful for sending a test
message with the smtp_send()
function.
prepare_test_message(incl_ggplot = FALSE, incl_image = FALSE)
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 |
---|---|
incl_image | An option to include a test image within the body of the
test message. By default, this is |
An email_message
object.
# 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" # ) # )