We can create a file with SMTP configuration and access credentials for the
purpose of more easily sending email messages through
this file produced, the credentials helper
creds_file() can be used in the
credentials argument of
create_smtp_creds_file( file, user = NULL, provider = NULL, host = NULL, port = NULL, use_ssl = NULL )
The output filename for the credentials file.
The username for the email account. Typically, this is the email address associated with the account.
An optional email provider shortname for autocompleting SMTP
configuration details (the
use_ssl options). Options
office365. If nothing is
provided then values for
use_ssl are expected.
Configuration info for the SMTP server. The
port parameters are the address and port for the SMTP server.
use_ssl is an option as to whether to allow the use of STARTTLS, if
available: it should be
TRUE unless you have a specific reason to set it
# Create a credentials file to make it # much easier to send email out through # Gmail with `smtp_send()`; name the # file "gmail_creds" # create_smtp_creds_file( # file = "gmail_creds", # user = "firstname.lastname@example.org", # provider = "gmail" # )