SES¶
boto.ses¶
-
boto.ses.
connect_to_region
(region_name, **kw_params)¶ Given a valid region name, return a
boto.sns.connection.SESConnection
.Type: str Parameters: region_name – The name of the region to connect to. Return type: boto.sns.connection.SESConnection
orNone
Returns: A connection to the given region, or None if an invalid region name is given
-
boto.ses.
get_region
(region_name, **kw_params)¶ Find and return a
boto.regioninfo.RegionInfo
object given a region name.Type: str Param: The name of the region. Return type: boto.regioninfo.RegionInfo
Returns: The RegionInfo object for the given region or None if an invalid region name is provided.
boto.ses.connection¶
-
class
boto.ses.connection.
SESConnection
(aws_access_key_id=None, aws_secret_access_key=None, is_secure=True, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, debug=0, https_connection_factory=None, region=None, path='/', security_token=None)¶ -
APIVersion
= '2010-12-01'¶
-
DefaultRegionEndpoint
= 'email.us-east-1.amazonaws.com'¶
-
DefaultRegionName
= 'us-east-1'¶
-
ResponseError
¶ alias of
BotoServerError
-
delete_verified_email_address
(email_address)¶ Deletes the specified email address from the list of verified addresses.
Parameters: email_address – The email address to be removed from the list of verified addreses. Return type: dict Returns: A DeleteVerifiedEmailAddressResponse structure. Note that keys must be unicode strings.
-
get_send_quota
()¶ Fetches the user’s current activity limits.
Return type: dict Returns: A GetSendQuotaResponse structure. Note that keys must be unicode strings.
-
get_send_statistics
()¶ Fetches the user’s sending statistics. The result is a list of data points, representing the last two weeks of sending activity.
Each data point in the list contains statistics for a 15-minute interval.
Return type: dict Returns: A GetSendStatisticsResponse structure. Note that keys must be unicode strings.
-
list_verified_email_addresses
()¶ Fetch a list of the email addresses that have been verified.
Return type: dict Returns: A ListVerifiedEmailAddressesResponse structure. Note that keys must be unicode strings.
-
send_email
(source, subject, body, to_addresses, cc_addresses=None, bcc_addresses=None, format='text', reply_addresses=None, return_path=None, text_body=None, html_body=None)¶ Composes an email message based on input data, and then immediately queues the message for sending.
Parameters: - source (string) – The sender’s email address.
- subject (string) – The subject of the message: A short summary of the content, which will appear in the recipient’s inbox.
- body (string) – The message body.
- to_addresses (list of strings or string) – The To: field(s) of the message.
- cc_addresses (list of strings or string) – The CC: field(s) of the message.
- bcc_addresses (list of strings or string) – The BCC: field(s) of the message.
- format (string) – The format of the message’s body, must be either “text” or “html”.
- reply_addresses (list of strings or string) – The reply-to email address(es) for the message. If the recipient replies to the message, each reply-to address will receive the reply.
- return_path (string) – The email address to which bounce notifications are to be forwarded. If the message cannot be delivered to the recipient, then an error message will be returned from the recipient’s ISP; this message will then be forwarded to the email address specified by the ReturnPath parameter.
- text_body (string) – The text body to send with this email.
- html_body (string) – The html body to send with this email.
-
send_raw_email
(raw_message, source=None, destinations=None)¶ Sends an email message, with header and content specified by the client. The SendRawEmail action is useful for sending multipart MIME emails, with attachments or inline content. The raw text of the message must comply with Internet email standards; otherwise, the message cannot be sent.
Parameters: - source (string) –
The sender’s email address. Amazon’s docs say:
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.
- raw_message (string) –
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.
- destinations (list of strings or string) – A list of destinations for the message.
- source (string) –
-
verify_email_address
(email_address)¶ Verifies an email address. This action causes a confirmation email message to be sent to the specified address.
Parameters: email_address – The email address to be verified. Return type: dict Returns: A VerifyEmailAddressResponse structure. Note that keys must be unicode strings.
-