
Send a single email
email.Rd
This function sends a single email via the Postmark API service. It supports both HTML and plain text email formats (but not both simultaneously) and can be used for both transactional ("outbound") and bulk ("broadcast") email message streams.
Usage
email_send_single(
from,
to,
msg_stream,
subject = NULL,
html_body = NULL,
text_body = NULL,
token = NULL
)
Arguments
- from
Character scalar. Email address of the sender.
- to
Character vector. Email addresses of recipients (max 50).
- msg_stream
Character scalar. Either "outbound" or "broadcast".
- subject
Character scalar. Email subject line.
- html_body
Character scalar. HTML content of the email.
- text_body
Character scalar. Plain text content of the email.
- token
Character string. Your Postmark API token. If NULL (default), the function will attempt to retrieve the token using
get_token()
POSTMARK_SERVER_TOKEN
as an environment variable. Check the Postmark's API documentation on how to get a server token.