sendemail: Send Email via SES

Description Usage Arguments Details Value Examples

Description

Send email via Amazon SES service

Usage

1
2
3
4
5
6
7
send_email(message, html, raw = NULL, subject, from, to = NULL, cc = NULL,
  bcc = NULL, replyto = NULL, returnpath = NULL, charset.subject = NULL,
  charset.message = NULL, charset.html = NULL, ...)

get_quota(...)

get_statistics(...)

Arguments

message

A character string specifying the message body (as plain text). Must specify html, message, or both; or alternatively raw.

html

A character string specifying the message body (as HTML). Must specify html, message, or both; or alternatively raw.

raw

A raw vector containing a valid email body (of no more than 10MB in size). Can only specify raw xor message/html.

subject

A character string specifying the email subject

from

A character string specifying teh sender

to

A character vector of TO recipient email addresses.

cc

A character vector of CC recipient email addresses.

bcc

A character vector of BCC recipient email addresses.

replyto

A character vector of reply-to email addresses.

returnpath

A character string specifying the email address to which feedback and bounces are sent.

charset.subject

An optional character string specifying the character set, e.g., “UTF-8”, “ISO-8859-1”, etc. if subject is not ASCII.

charset.message

An optional character string specifying the character set, e.g., “UTF-8”, “ISO-8859-1”, etc. if message is not ASCII.

charset.html

An optional character string specifying the character set, e.g., “UTF-8”, “ISO-8859-1”, etc. if html is not ASCII.

...

Additional arguments passed to sesPOST.

Details

Send a test or raw email message. get_quota and get_statistics provide information on remaining and used email rate limits, respectively.

Value

A character string containg the message ID.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## Not run: 
# verify email address
verify_identity("me@example.com")

# if email verified, can be used to send a message
a <- get_verification_attrs("me@example.com")
if (a[[1]]$VerificationStatus == "Success") {
  # simple plain-text email
  send_email("Test Email Body", subject = "Test Email", 
             from = "me@example.com", to = "recipient@example.com")

  # html and plain text versions
  send_email(message = "Plain text body", 
             html = "<div><p style='font-weight=bold;'>HTML text body</p></div>", 
             subject = "Test Email", 
             from = "me@example.com", to = "recipient@example.com")
}

## End(Not run)
## Not run: 
get_quota()
get_statistics()

## End(Not run) 

cloudyr/aws.ses documentation built on Jan. 14, 2020, 4:58 a.m.