Amazon Simple Email Service
API Reference (API Version 2010-12-01)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

SendRawEmail

Description

Sends an email message, with header and content specified by the client. The SendRawEmail action is useful for sending multipart MIME emails. The raw text of the message must comply with Internet email standards; otherwise, the message cannot be sent.

[Important]Important
If you have not yet requested production access to Amazon SES, then you will only be able to send email to and from verified email addresses and domains. For more information, go to the Amazon SES Developer Guide.

The total size of the message cannot exceed 10 MB. This includes any attachments that are part of the message.

Amazon SES has a limit on the total number of recipients per message: The combined number of To:, CC: and BCC: email addresses cannot exceed 50. If you need to send an email message to a larger audience, you can divide your recipient list into groups of 50 or fewer, and then call Amazon SES repeatedly to send the message to each group.

For every message that you send, the total number of recipients (To:, CC: and BCC:) is counted against your sending quota - the maximum number of emails you can send in a 24-hour period. For information about your sending quota, go to the "Managing Your Sending Activity" section of theAmazon SES Developer Guide.

Request Parameters

For information about the common parameters that all actions use, see Common Query Parameters.

Name Description Required
Destinations.member.N

A list of destinations for the message.

Type: String list

No
RawMessage

The raw text of the message. The client is responsible for ensuring the following:

  • Message must contain a header and a body, separated by a blank line.
  • All required header fields must be present.
  • Each part of a multipart MIME message must be formatted properly.
  • MIME content types must be among those supported by Amazon SES. Refer to the Amazon SES Developer Guide for more details.
  • Content must be base64-encoded, if MIME requires it.

Type: RawMessage

Yes
Source

The identity's email address.

[Note]Note
If you specify the Source parameter, then bounce notifications and complaints will be sent to this email address. This takes precedence over any Return-Path header that you might include in the raw text of the message.

Type: String

No

Response Elements

The following elements come wrapped in a SendRawEmailResult structure.
NameDescription
MessageId

The unique message identifier returned from the SendRawEmail action.

Type: String

Errors

For information about the common errors that all actions use, see Common Errors.

Error Description HTTP Status Code
MessageRejected

Indicates that the action failed, and the message could not be sent. Check the error stack for more information about what caused the error.

400

Examples

Sample Request

                
POST / HTTP/1.1
Date: Wed, 17 Aug 2011 00:21:38 GMT
Host: email.us-east-1.amazonaws.com
Content-Type: application/x-www-form-urlencoded
X-Amzn-Authorization: AWS3 AWSAccessKeyId=AKIAIOSFODNN7EXAMPLE, Signature=uN0lHIf14tmMBzwnkHzaWBLrBFvJAvyXCsfSYAvwLuc=, Algorithm=HmacSHA256, SignedHeaders=Date;Host
Content-Length: 230

AWSAccessKeyId=AKIAIOSFODNN7EXAMPLE&Action=SendRawEmail&RawMessage.Data=U3Vi
amVjdDogRXhhbXBsZQpGcm9tOiBleGFtcGxlQGFtYXpvbi5jb20KVG86IGV4YW1wbGVAYW1h%0Ae
m9uLmNvbQpDb250ZW50LVR5cGU6IG11bHRpcGFydC9hbHRlcm5hdGl2ZTsgYm91bmRhcnk9MDAx%
0ANmU2OGY5ZDkyOWNiMDk2MDRhYWE4MzA0MgoKLS0wMDE2ZTY4ZjlkOTI5Y2IwOTYwNGFhYTgzMD
Qy%0ACkNvbnRlbnQtVHlwZTogdGV4dC9wbGFpbjsgY2hhcnNldD1JU08tODg1OS0xCgpCb2R5Lgo
KLS0w%0AMDE2ZTY4ZjlkOTI5Y2IwOTYwNGFhYTgzMDQyCkNvbnRlbnQtVHlwZTogdGV4dC9odG1s
OyBjaGFy%0Ac2V0PUlTTy04ODU5LTEKCkJvZHkuPGJyPgoKLS0wMDE2ZTY4ZjlkOTI5Y2IwOTYwN
GFhYTgzMDQy%0ALS0%3D%0A&Timestamp=2011-08-17T00%3A21%3A38.000Z
          
            

Sample Response

                
<SendRawEmailResponse xmlns="http://ses.amazonaws.com/doc/2010-12-01/">
  <SendRawEmailResult>
    <MessageId>00000131d51d6b36-1d4f9293-0aee-4503-b573-9ae4e70e9e38-000000</MessageId>
  </SendRawEmailResult>
  <ResponseMetadata>
    <RequestId>e0abcdfa-c866-11e0-b6d0-273d09173b49</RequestId>
  </ResponseMetadata>
</SendRawEmailResponse>