-
Notifications
You must be signed in to change notification settings - Fork 2
SendEmail
Composes an email message based on input data, and then immediately queues the message for sending.
Parameter Name | Value(s) | Required? | Default Value | Example |
---|---|---|---|---|
Source | Exactly one Mailbox, Angle Address, or Address with Display name | Yes | None | Jim Miller <james@example.org> |
Destination.ToAddresses.member.N
|
Exactly one Mailbox, Angle Address, or Address with Display name | At least one destination is required (any of To, Cc, Bcc) | None | "Smith, Barabara" <bsmith@example.com> |
Destination.CcAddresses.member.N
|
Exactly one Mailbox, Angle Address, or Address with Display name | At least one destination is required (any of To, Cc, Bcc) | None | "Smith, Barabara" <bsmith@example.com> |
Destination.BccAddresses.member.N
|
Exactly one Mailbox, Angle Address, or Address with Display name | At least one destination is required (any of To, Cc, Bcc) | None | "Smith, Barabara" <bsmith@example.com> |
Message.Subject.Charset | A valid character set name | No | US-ASCII |
UTF-8 |
Message.Subject.Data | Any text | Yes | None | |
Message.Body.Text.Charset | A valid character set name | No | US-ASCII |
UTF-8 |
Message.Body.Text.Data | Any text | At least one of Message.Body.Text.Data and Message.Body.Html.Data is required. All messages should have Message.Body.Text.Data set, as many mail filters assume HTML-only messages are spam. | None | see example below |
Message.Body.Html.Charset | A valid character set name | No | US-ASCII |
UTF-8 |
Message.Body.Html.Data | Any valid HTML | At least one of Message.Body.Text.Data and Message.Body.Html.Data is required | None | see example below |
ReplyToAddresses.member.N
|
Exactly one Mailbox, Angle Address, or Address with Display name | No | None | david.wilson@example.com |
ReturnPath | Exactly one Mailbox | No | the Source address | elizabeth.jones@example.net |
Any parameter that has a N
, can be repeated multiple times. In all cases, the N
must be replaced with a number from 1 to 99.
The total number of recipients specified in To, CC, and BCC per email can be no more than 50.
It is strongly recommended that all addresses are normalized.
Note that the ReturnPath
parameter to this method has the same meaning as the Source
parameter to the SendRawEmail method. In this method, the Source
parameter is used as the From
header in the email.
For more information about character sets, please see The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!) by Joel Spolsky.
Thank you for ordering from Example Industries. The following items will be
shipped to you as soon as they are available.
Jurg van Vliet: Programming Amazon EC2
Quantity: 1 Price: $28.72
Frank Munz: Middleware and Cloud Computing: Oracle on
Amazon Web Services (AWS), Rackspace Cloud and RightScale
Quantity: 1 Price: $64.95
Jeff Barr: Host Your Web Site on the Cloud: Amazon Web Services Made Easy
Quantity: 1 Price: ¥ 3,504
Note the Yen sign on the last line. As this is not part of US-ASCII, the character set must be defined for this text.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head><title>Order Information</title></head>
<body>
<p>Thank you for ordering from Example Industries. The following items will be shipped to you as soon as they are available.<p>
<table style="border: 0;">
<tr><th>Item|Quantity|Price</th></tr>
<img src="http://www.example.com/book1.jpg" width="57" height="75" alt="Book Cover"><br>Jurg van Vliet: Programming Amazon EC2|1|$28.72
<img src="http://www.example.com/book2.jpg" width="53" height="75" alt="Book Cover"><br>Frank Munz: Middleware and Cloud Computing: Oracle on Amazon Web Services (AWS), Rackspace Cloud and RightScale|1|$64.95
<img src="http://www.example.com/book3.jpg" width="58" height="75" alt="Book Cover"><br>Jeff Barr: Host Your Web Site on the Cloud: Amazon Web Services Made Easy|1|¥ 3,504
</body>
</html>
Here the Yen sign is represented using a HTML character entity (¥
) so the resulting content is all US-ASCII. No character set will need to be defined for the HTML part of the message.
GET /?Action=SendEmail&Destination.ToAddresses.member.1=Beth+Jones+%3Celizabeth.jones%40example.net%3E&Message.Body.Html.Data=%3C%21DOCTYPE+HTML+PUBLIC+%22-%2F%2FW3C%2F%2FDTD+HTML+4.01%2F%2FEN%22++%22http%3A%2F%2Fwww.w3.org%2FTR%2Fhtml4%2Fstrict.dtd%22%3E%0A%3Chtml%3E%0A%3Chead%3E%3Ctitle%3EOrder+Information%3C%2Ftitle%3E%3C%2Fhead%3E%0A%3Cbody%3E%0A%3Cp%3EThank+you+for+ordering+from+Example+Industries.++The+following+items+will+be+shipped+to+you+as+soon+as+they+are+available.%3Cp%3E%0A%3Ctable+style%3D%22border%3A+0%3B%22%3E%0A%3Ctr%3E%3Cth%3EItem%3C%2Fth%3E%3Cth%3EQuantity%3C%2Fth%3E%3Cth%3EPrice%3C%2Fth%3E%3C%2Ftr%3E%0A%3Ctr%3E%3Ctd%3E%3Cimg+src%3D%22http%3A%2F%2Fwww.example.com%2Fbook1.jpg%22+width%3D%2257%22+height%3D%2275%22+alt%3D%22Book+Cover%22%3E%3Cbr%3EJurg+van+Vliet%3A+Programming+Amazon+EC2%3C%2Ftd%3E%3Ctd%3E1%3C%2Ftd%3E%3Ctd%3E%2428.72%3C%2Ftd%3E%3C%2Ftr%3E%0A%3Ctr%3E%3Ctd%3E%3Cimg+src%3D%22http%3A%2F%2Fwww.example.com%2Fbook2.jpg%22+width%3D%2253%22+height%3D%2275%22+alt%3D%22Book+Cover%22%3E%3Cbr%3EFrank+Munz%3A+Middleware+and+Cloud+Computing%3A+Oracle+on+Amazon+Web+Services+%28AWS%29%2C+Rackspace+Cloud+and+RightScale%3C%2Ftd%3E%3Ctd%3E1%3C%2Ftd%3E%3Ctd%3E%2464.95%3C%2Ftd%3E%3C%2Ftr%3E%0A%3Ctr%3E%3Ctd%3E%3Cimg+src%3D%22http%3A%2F%2Fwww.example.com%2Fbook3.jpg%22+width%3D%2258%22+height%3D%2275%22+alt%3D%22Book+Cover%22%3E%3Cbr%3EJeff+Barr%3A+Host+Your+Web+Site+on+the+Cloud%3A+Amazon+Web+Services+Made+Easy%3C%2Ftd%3E%3Ctd%3E1%3C%2Ftd%3E%3Ctd%3E%26yen%3B+3%2C504%3C%2Ftd%3E%3C%2Ftr%3E%0A%3C%2Ftable%3E%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E&Message.Body.Text.Charset=UTF-8&Message.Body.Text.Data=Thank+you+for+ordering+from+Example+Industries.++The+following+items+will+be%0Ashipped+to+you+as+soon+as+they+are+available.%0A%0AJurg+van+Vliet%3A+Programming+Amazon+EC2%0A++++Quantity%3A+1+Price%3A+%2428.72%0A%0AFrank+Munz%3A+Middleware+and+Cloud+Computing%3A+Oracle+on%0AAmazon+Web+Services+%28AWS%29%2C+Rackspace+Cloud+and+RightScale%0A++++Quantity%3A+1+Price%3A+%2464.95%0A%0AJeff+Barr%3A+Host+Your+Web+Site+on+the+Cloud%3A+Amazon+Web+Services+Made+Easy%0A++++Quantity%3A+1+Price%3A+%C2%A5+3%2C504&Message.Subject.Data=Order+Information&Source=%22Chuck+Johnson%22+%3Ccharles%40example.org%3E HTTP/1.1
Host: email.us-east-1.amazonaws.com
Date: Sun, 17 Apr 2011 08:42:30 -0400
X-Amzn-Authorization: AWS3-HTTPS AWSAccessKeyId=AKIAH3VO4JIRTLHHP4AK,Algorithm=HmacSHA256,Signature=OAnmbUmDLUlX0w+ZeIisxXpOQsKEY5+4Uh9qTvGOpw0=
POST / HTTP/1.1
Host: email.us-east-1.amazonaws.com
Date: Sun, 17 Apr 2011 08:42:30 -0400
X-Amzn-Authorization: AWS3-HTTPS AWSAccessKeyId=AKIAH3VO4JIRTLHHP4AK,Algorithm=HmacSHA256,Signature=OAnmbUmDLUlX0w+ZeIisxXpOQsKEY5+4Uh9qTvGOpw0=
Content-Length: 2217
Content-Type: application/x-www-form-urlencoded
Action=SendEmail&Destination.ToAddresses.member.1=Beth+Jones+%3Celizabeth.jones%40example.net%3E&Message.Body.Html.Data=%3C%21DOCTYPE+HTML+PUBLIC+%22-%2F%2FW3C%2F%2FDTD+HTML+4.01%2F%2FEN%22++%22http%3A%2F%2Fwww.w3.org%2FTR%2Fhtml4%2Fstrict.dtd%22%3E%0A%3Chtml%3E%0A%3Chead%3E%3Ctitle%3EOrder+Information%3C%2Ftitle%3E%3C%2Fhead%3E%0A%3Cbody%3E%0A%3Cp%3EThank+you+for+ordering+from+Example+Industries.++The+following+items+will+be+shipped+to+you+as+soon+as+they+are+available.%3Cp%3E%0A%3Ctable+style%3D%22border%3A+0%3B%22%3E%0A%3Ctr%3E%3Cth%3EItem%3C%2Fth%3E%3Cth%3EQuantity%3C%2Fth%3E%3Cth%3EPrice%3C%2Fth%3E%3C%2Ftr%3E%0A%3Ctr%3E%3Ctd%3E%3Cimg+src%3D%22http%3A%2F%2Fwww.example.com%2Fbook1.jpg%22+width%3D%2257%22+height%3D%2275%22+alt%3D%22Book+Cover%22%3E%3Cbr%3EJurg+van+Vliet%3A+Programming+Amazon+EC2%3C%2Ftd%3E%3Ctd%3E1%3C%2Ftd%3E%3Ctd%3E%2428.72%3C%2Ftd%3E%3C%2Ftr%3E%0A%3Ctr%3E%3Ctd%3E%3Cimg+src%3D%22http%3A%2F%2Fwww.example.com%2Fbook2.jpg%22+width%3D%2253%22+height%3D%2275%22+alt%3D%22Book+Cover%22%3E%3Cbr%3EFrank+Munz%3A+Middleware+and+Cloud+Computing%3A+Oracle+on+Amazon+Web+Services+%28AWS%29%2C+Rackspace+Cloud+and+RightScale%3C%2Ftd%3E%3Ctd%3E1%3C%2Ftd%3E%3Ctd%3E%2464.95%3C%2Ftd%3E%3C%2Ftr%3E%0A%3Ctr%3E%3Ctd%3E%3Cimg+src%3D%22http%3A%2F%2Fwww.example.com%2Fbook3.jpg%22+width%3D%2258%22+height%3D%2275%22+alt%3D%22Book+Cover%22%3E%3Cbr%3EJeff+Barr%3A+Host+Your+Web+Site+on+the+Cloud%3A+Amazon+Web+Services+Made+Easy%3C%2Ftd%3E%3Ctd%3E1%3C%2Ftd%3E%3Ctd%3E%26yen%3B+3%2C504%3C%2Ftd%3E%3C%2Ftr%3E%0A%3C%2Ftable%3E%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E&Message.Body.Text.Charset=UTF-8&Message.Body.Text.Data=Thank+you+for+ordering+from+Example+Industries.++The+following+items+will+be%0Ashipped+to+you+as+soon+as+they+are+available.%0A%0AJurg+van+Vliet%3A+Programming+Amazon+EC2%0A++++Quantity%3A+1+Price%3A+%2428.72%0A%0AFrank+Munz%3A+Middleware+and+Cloud+Computing%3A+Oracle+on%0AAmazon+Web+Services+%28AWS%29%2C+Rackspace+Cloud+and+RightScale%0A++++Quantity%3A+1+Price%3A+%2464.95%0A%0AJeff+Barr%3A+Host+Your+Web+Site+on+the+Cloud%3A+Amazon+Web+Services+Made+Easy%0A++++Quantity%3A+1+Price%3A+%C2%A5+3%2C504&Message.Subject.Data=Order+Information&Source=%22Chuck+Johnson%22+%3Ccharles%40example.org%3E
<SendEmailResponse xmlns="http://ses.amazonaws.com/doc/2010-12-01/">
<SendEmailResult>
<MessageId>0000012f636d3219-ca4ec4d3-2d69-4385-af4d-57aaec360d69-000000</MessageId>
</SendEmailResult>
<ResponseMetadata>
<RequestId>ecf4d139-68ed-11e0-8b63-8105c8ef09de</RequestId>
</ResponseMetadata>
</SendEmailResponse>
Feel free to make edits to this wiki, especially if things are unclear or missing. By editing or contributing you agree that your changes and additions are licensed under the Creative Commons Attribution-ShareAlike 3.0 license and you also give explicit permission to Amazon Web Services LLC and/or its affiliates to use the material as they see fit, without attribution or other restriction.