send_mailgun: Send an email message via the Mailgun API

View source: R/utilities.R

send_mailgunR Documentation

Send an email message via the Mailgun API

Description

Send an email message via the Mailgun API

Usage

send_mailgun(
  to = "robin@wustl.edu",
  from = "Excited User",
  subject = "Mailgun Test",
  html = "<div>Test</div>",
  text = html,
  domain_name = Sys.getenv("MAILGUN_DOMAIN_NAME"),
  api_key = Sys.getenv("MAILGUN_API_KEY"),
  ssl_verifypeer = TRUE
)

Arguments

to

email address of recipient

from

name of sender (but will come from mailgun@domain_name)

subject

subject of message

html

html body of message

text

text body of message

domain_name

Mailgun domain name (e.g., sandbox.mailgun.org)

api_key

Mailgun API password

ssl_verifypeer

whether to verify peer

Value

TRUE if successful; error otherwise

References

Mailgun API Documentation

See Also

POST, set_config

Examples

## Not run: 
## Retrieve Mailgun domain name and API key from .Renviron file
send_mailgun(
  to = "robin@wustl.edu",
  from = "Robin",
  subject = "Robin Says Hi!",
  html = "<p>Hi Robin,</p><p>Robin</p>"
)

## End(Not run)

the-mad-statter/washu documentation built on May 5, 2024, 10:26 a.m.