# NOT RUN {
# Message in RFC2822 format
message <- 'From: "Testbot" <jeroen@ocpu.io>
To: "Jeroen Ooms" <jeroenooms@gmail.com>
Subject: Hello there!
Hi Jeroen,
I am sending this email using curl.'
# Actually send the email
recipients <- c('test@opencpu.org', 'jeroenooms@gmail.com')
sender <- 'test@ocpu.io'
username <- 'mail@ocpu.io'
password <- askpass::askpass(paste("SMTP server password for", username))
send_mail(sender, recipients, smtp_server = 'smtp.mailgun.org',
message = message, username = username, password = password)
# }
Run the code above in your browser using DataLab