|« PreviousNext »|
|Did this page help you? Yes | No | Tell us about it...|
You can send a raw email message using ses-send-email.pl. This is the same script that is described in Sending Formatted Email. Use the -r parameter to specify raw email.
ses-send-email.pl [--help] [-e URL] [-k FILE] [--verbose] [-f FROM_EMAIL] -r
When you use the script ses-send-email.pl with the
-r parameter, you must compose the message yourself. The script
then sends a request to Amazon SES to send the message.
|Displays a usage summary for this script.||No|
|Uses the specified Amazon SES endpoint. The default is https://email.us-east-1.amazonaws.com.||No|
|Specifies a file containing your AWS credentials. For more information, see Using Your AWS Credentials .||Yes|
|Displays detailed information about the endpoint response.||No|
|The email address of the sender, followed immediately by the email address of the recipient. You can specify multiple recipients, separated by commas.||No|
|Specifies that this is a raw email message. You are responsible for ensuring that the raw message contains the correct email headers, and that it is encoded properly.||No|
|The email addresses of blind copy recipients (Bcc). You can specify multiple recipients, separated by commas.||No|
|The email addresses of the primary recipients. You can specify multiple recipients, separated by commas.||Yes|
|A file containing the body of the message. Use the left angle bracket (<) character to read from this file, rather than from standard input.||No|
You can specify the To: address as a command line option, or include it in the raw email header.
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, see Managing Your Amazon SES Sending Limits.
The ses-send-email.pl script does not generate any output, except for error messages.
This example shows how to send a MIME-encoded email, using the
$ses-send-email.pl -r < mimefile.txt
The raw email message is contained in a file named mimefile.txt, which might look like the following.
From: firstname.lastname@example.org To: email@example.com Subject: MIME email test MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="==boundary==" This is a message with multiple parts in MIME format. --==boundary== Content-Type: text/plain This is part of the message. --==boundary== Content-Type: text/html <h1>This is another part of the message.</h1> --==boundary==--
If you use the
-r parameter, then the raw message must
conform to Internet email standards—Amazon SES cannot send it