2015/05/07 - Amazon Simple Email Service - 18 new api methods
Returns the user's current sending limits.
This action is throttled at one request per second.
Request Syntax
client.get_send_quota()
dict
Response Syntax
{ 'Max24HourSend': 123.0, 'MaxSendRate': 123.0, 'SentLast24Hours': 123.0 }
Response Structure
(dict) --
Represents the user's current activity limits returned from a successful GetSendQuota request.
Max24HourSend (float) --
The maximum number of emails the user is allowed to send in a 24-hour interval. A value of -1 signifies an unlimited quota.
MaxSendRate (float) --
The maximum number of emails that Amazon SES can accept from the user's account per second.
SentLast24Hours (float) --
The number of emails sent during the previous 24 hours.
Verifies a domain.
This action is throttled at one request per second.
Request Syntax
client.verify_domain_identity( Domain='string' )
string
[REQUIRED]
The domain to be verified.
dict
Response Syntax
{ 'VerificationToken': 'string' }
Response Structure
(dict) --
Represents a token used for domain ownership verification.
VerificationToken (string) --
A TXT record that must be placed in the DNS settings for the domain, in order to complete domain verification.
Returns the current status of Easy DKIM signing for an entity. For domain name identities, this action also returns the DKIM tokens that are required for Easy DKIM signing, and whether Amazon SES has successfully verified that these tokens have been published.
This action takes a list of identities as input and returns the following information for each:
Whether Easy DKIM signing is enabled or disabled.
A set of DKIM tokens that represent the identity. If the identity is an email address, the tokens represent the domain of that address.
Whether Amazon SES has successfully verified the DKIM tokens published in the domain's DNS. This information is only returned for domain name identities, not for email addresses.
This action is throttled at one request per second and can only get DKIM attributes for up to 100 identities at a time.
For more information about creating DNS records using DKIM tokens, go to the Amazon SES Developer Guide.
Request Syntax
client.get_identity_dkim_attributes( Identities=[ 'string', ] )
list
[REQUIRED]
A list of one or more verified identities - email addresses, domains, or both.
(string) --
dict
Response Syntax
{ 'DkimAttributes': { 'string': { 'DkimEnabled': True|False, 'DkimVerificationStatus': 'Pending'|'Success'|'Failed'|'TemporaryFailure'|'NotStarted', 'DkimTokens': [ 'string', ] } } }
Response Structure
(dict) --
Represents a list of all the DKIM attributes for the specified identity.
DkimAttributes (dict) --
The DKIM attributes for an email address or a domain.
(string) --
(dict) --
Represents the DKIM attributes of a verified email address or a domain.
DkimEnabled (boolean) --
True if DKIM signing is enabled for email sent from the identity; false otherwise.
DkimVerificationStatus (string) --
Describes whether Amazon SES has successfully verified the DKIM DNS records (tokens) published in the domain name's DNS. (This only applies to domain identities, not email address identities.)
DkimTokens (list) --
A set of character strings that represent the domain's identity. Using these tokens, you will need to create DNS CNAME records that point to DKIM public keys hosted by Amazon SES. Amazon Web Services will eventually detect that you have updated your DNS records; this detection process may take up to 72 hours. Upon successful detection, Amazon SES will be able to DKIM-sign email originating from that domain. (This only applies to domain identities, not email address identities.)
For more information about creating DNS records using DKIM tokens, go to the Amazon SES Developer Guide.
(string) --
Verifies an email address. This action causes a confirmation email message to be sent to the specified address.
This action is throttled at one request per second.
Request Syntax
client.verify_email_address( EmailAddress='string' )
string
[REQUIRED]
The email address to be verified.
None
Given a list of identities (email addresses and/or domains), returns the verification status and (for domain identities) the verification token for each identity.
This action is throttled at one request per second and can only get verification attributes for up to 100 identities at a time.
Request Syntax
client.get_identity_verification_attributes( Identities=[ 'string', ] )
list
[REQUIRED]
A list of identities.
(string) --
dict
Response Syntax
{ 'VerificationAttributes': { 'string': { 'VerificationStatus': 'Pending'|'Success'|'Failed'|'TemporaryFailure'|'NotStarted', 'VerificationToken': 'string' } } }
Response Structure
(dict) --
Represents the verification attributes for a list of identities.
VerificationAttributes (dict) --
A map of Identities to IdentityVerificationAttributes objects.
(string) --
(dict) --
Represents the verification attributes of a single identity.
VerificationStatus (string) --
The verification status of the identity: "Pending", "Success", "Failed", or "TemporaryFailure".
VerificationToken (string) --
The verification token for a domain identity. Null for email address identities.
Given an identity (email address or domain), enables or disables whether Amazon SES forwards bounce and complaint notifications as email. Feedback forwarding can only be disabled when Amazon Simple Notification Service (Amazon SNS) topics are specified for both bounces and complaints.
This action is throttled at one request per second.
For more information about using notifications with Amazon SES, see the Amazon SES Developer Guide.
Request Syntax
client.set_identity_feedback_forwarding_enabled( Identity='string', ForwardingEnabled=True|False )
string
[REQUIRED]
The identity for which to set bounce and complaint notification forwarding. Examples: user@example.com, example.com.
boolean
[REQUIRED]
Sets whether Amazon SES will forward bounce and complaint notifications as email. true specifies that Amazon SES will forward bounce and complaint notifications as email, in addition to any Amazon SNS topic publishing otherwise specified. false specifies that Amazon SES will publish bounce and complaint notifications only through Amazon SNS. This value can only be set to false when Amazon SNS topics are set for both Bounce and Complaint notification types.
dict
Response Syntax
{}
Response Structure
(dict) --
An empty element. Receiving this element indicates that the request completed successfully.
Returns 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.
This action is throttled at one request per second.
Request Syntax
client.get_send_statistics()
dict
Response Syntax
{ 'SendDataPoints': [ { 'Timestamp': datetime(2015, 1, 1), 'DeliveryAttempts': 123, 'Bounces': 123, 'Complaints': 123, 'Rejects': 123 }, ] }
Response Structure
(dict) --
Represents a list of SendDataPoint items returned from a successful GetSendStatistics request. This list contains aggregated data from the previous two weeks of sending activity.
SendDataPoints (list) --
A list of data points, each of which represents 15 minutes of activity.
(dict) --
Represents sending statistics data. Each SendDataPoint contains statistics for a 15-minute period of sending activity.
Timestamp (datetime) --
Time of the data point.
DeliveryAttempts (integer) --
Number of emails that have been enqueued for sending.
Bounces (integer) --
Number of emails that have bounced.
Complaints (integer) --
Number of unwanted emails that were rejected by recipients.
Rejects (integer) --
Number of emails rejected by Amazon SES.
Deletes the specified identity (email address or domain) from the list of verified identities.
This action is throttled at one request per second.
Request Syntax
client.delete_identity( Identity='string' )
string
[REQUIRED]
The identity to be removed from the list of identities for the AWS Account.
dict
Response Syntax
{}
Response Structure
(dict) --
An empty element. Receiving this element indicates that the request completed successfully.
Returns a list containing all of the identities (email addresses and domains) for a specific AWS Account, regardless of verification status.
This action is throttled at one request per second.
Request Syntax
client.list_identities( IdentityType='EmailAddress'|'Domain', NextToken='string', MaxItems=123 )
string
The type of the identities to list. Possible values are "EmailAddress" and "Domain". If this parameter is omitted, then all identities will be listed.
string
The token to use for pagination.
integer
The maximum number of identities per page. Possible values are 1-1000 inclusive.
dict
Response Syntax
{ 'Identities': [ 'string', ], 'NextToken': 'string' }
Response Structure
(dict) --
Represents a list of all verified identities for the AWS Account.
Identities (list) --
A list of identities.
(string) --
NextToken (string) --
The token used for pagination.
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.
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.
The To:, CC:, and BCC: headers in the raw message can contain a group list. Note that each recipient in a group list counts towards the 50-recipient limit.
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 Amazon SES Developer Guide.
Request Syntax
client.send_raw_email( Source='string', Destinations=[ 'string', ], RawMessage={ 'Data': b'bytes' } )
string
The identity's email address. If you do not provide a value for this parameter, you must specify a "From" address in the raw text of the message. (You can also specify both.)
By default, the string must be 7-bit ASCII. If the text must contain any other characters, then you must use MIME encoded-word syntax (RFC 2047) instead of a literal string. MIME encoded-word syntax uses the following form: =?charset?encoding?encoded-text?=. For more information, see RFC 2047.
list
A list of destinations for the message, consisting of To:, CC:, and BCC: addresses.
(string) --
dict
[REQUIRED]
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. For more information, go to the Amazon SES Developer Guide.
Content must be base64-encoded, if MIME requires it.
Data (bytes) -- [REQUIRED]
The raw data of the message. The client must ensure that the message format complies with Internet email standards regarding email header fields, MIME types, MIME encoding, and base64 encoding (if necessary).
The To:, CC:, and BCC: headers in the raw message can contain a group list.
For more information, go to the Amazon SES Developer Guide.
dict
Response Syntax
{ 'MessageId': 'string' }
Response Structure
(dict) --
Represents a unique message ID returned from a successful SendRawEmail request.
MessageId (string) --
The unique message identifier returned from the SendRawEmail action.
Deletes the specified email address from the list of verified addresses.
This action is throttled at one request per second.
Request Syntax
client.delete_verified_email_address( EmailAddress='string' )
string
[REQUIRED]
An email address to be removed from the list of verified addresses.
None
Enables or disables Easy DKIM signing of email sent from an identity:
If Easy DKIM signing is enabled for a domain name identity (e.g., example.com), then Amazon SES will DKIM-sign all email sent by addresses under that domain name (e.g., user@example.com).
If Easy DKIM signing is enabled for an email address, then Amazon SES will DKIM-sign all email sent by that email address.
For email addresses (e.g., user@example.com), you can only enable Easy DKIM signing if the corresponding domain (e.g., example.com) has been set up for Easy DKIM using the AWS Console or the VerifyDomainDkim action.
This action is throttled at one request per second.
For more information about Easy DKIM signing, go to the Amazon SES Developer Guide.
Request Syntax
client.set_identity_dkim_enabled( Identity='string', DkimEnabled=True|False )
string
[REQUIRED]
The identity for which DKIM signing should be enabled or disabled.
boolean
[REQUIRED]
Sets whether DKIM signing is enabled for an identity. Set to true to enable DKIM signing for this identity; false to disable it.
dict
Response Syntax
{}
Response Structure
(dict) --
An empty element. Receiving this element indicates that the request completed successfully.
Given an identity (email address or domain), sets the Amazon Simple Notification Service (Amazon SNS) topic to which Amazon SES will publish bounce, complaint, and/or delivery notifications for emails sent with that identity as the Source.
This action is throttled at one request per second.
For more information about feedback notification, see the Amazon SES Developer Guide.
Request Syntax
client.set_identity_notification_topic( Identity='string', NotificationType='Bounce'|'Complaint'|'Delivery', SnsTopic='string' )
string
[REQUIRED]
The identity for which the Amazon SNS topic will be set. Examples: user@example.com, example.com.
string
[REQUIRED]
The type of notifications that will be published to the specified Amazon SNS topic.
string
The Amazon Resource Name (ARN) of the Amazon SNS topic. If the parameter is omitted from the request or a null value is passed, SnsTopic is cleared and publishing is disabled.
dict
Response Syntax
{}
Response Structure
(dict) --
An empty element. Receiving this element indicates that the request completed successfully.
Composes an email message based on input data, and then immediately queues the message for sending.
The total size of the message cannot exceed 10 MB.
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 Amazon SES Developer Guide.
Request Syntax
client.send_email( Source='string', Destination={ 'ToAddresses': [ 'string', ], 'CcAddresses': [ 'string', ], 'BccAddresses': [ 'string', ] }, Message={ 'Subject': { 'Data': 'string', 'Charset': 'string' }, 'Body': { 'Text': { 'Data': 'string', 'Charset': 'string' }, 'Html': { 'Data': 'string', 'Charset': 'string' } } }, ReplyToAddresses=[ 'string', ], ReturnPath='string' )
string
[REQUIRED]
The identity's email address.
By default, the string must be 7-bit ASCII. If the text must contain any other characters, then you must use MIME encoded-word syntax (RFC 2047) instead of a literal string. MIME encoded-word syntax uses the following form: =?charset?encoding?encoded-text?=. For more information, see RFC 2047.
dict
[REQUIRED]
The destination for this email, composed of To:, CC:, and BCC: fields.
ToAddresses (list) --
The To: field(s) of the message.
(string) --
CcAddresses (list) --
The CC: field(s) of the message.
(string) --
BccAddresses (list) --
The BCC: field(s) of the message.
(string) --
dict
[REQUIRED]
The message to be sent.
Subject (dict) -- [REQUIRED]
The subject of the message: A short summary of the content, which will appear in the recipient's inbox.
Data (string) -- [REQUIRED]
The textual data of the content.
Charset (string) --
The character set of the content.
Body (dict) -- [REQUIRED]
The message body.
Text (dict) --
The content of the message, in text format. Use this for text-based email clients, or clients on high-latency networks (such as mobile devices).
Data (string) -- [REQUIRED]
The textual data of the content.
Charset (string) --
The character set of the content.
Html (dict) --
The content of the message, in HTML format. Use this for email clients that can process HTML. You can include clickable links, formatted text, and much more in an HTML message.
Data (string) -- [REQUIRED]
The textual data of the content.
Charset (string) --
The character set of the content.
list
The reply-to email address(es) for the message. If the recipient replies to the message, each reply-to address will receive the reply.
(string) --
string
The email address to which bounces and complaints are to be forwarded when feedback forwarding is enabled. 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. The ReturnPath parameter is never overwritten. This email address must be either individually verified with Amazon SES, or from a domain that has been verified with Amazon SES.
dict
Response Syntax
{ 'MessageId': 'string' }
Response Structure
(dict) --
Represents a unique message ID returned from a successful SendEmail request.
MessageId (string) --
The unique message identifier returned from the SendEmail action.
Returns a set of DKIM tokens for a domain. DKIM tokens are character strings that represent your domain's identity. Using these tokens, you will need to create DNS CNAME records that point to DKIM public keys hosted by Amazon SES. Amazon Web Services will eventually detect that you have updated your DNS records; this detection process may take up to 72 hours. Upon successful detection, Amazon SES will be able to DKIM-sign email originating from that domain.
This action is throttled at one request per second.
To enable or disable Easy DKIM signing for a domain, use the SetIdentityDkimEnabled action.
For more information about creating DNS records using DKIM tokens, go to the Amazon SES Developer Guide.
Request Syntax
client.verify_domain_dkim( Domain='string' )
string
[REQUIRED]
The name of the domain to be verified for Easy DKIM signing.
dict
Response Syntax
{ 'DkimTokens': [ 'string', ] }
Response Structure
(dict) --
Represents the DNS records that must be published in the domain name's DNS to complete DKIM setup.
DkimTokens (list) --
A set of character strings that represent the domain's identity. If the identity is an email address, the tokens represent the domain of that address.
Using these tokens, you will need to create DNS CNAME records that point to DKIM public keys hosted by Amazon SES. Amazon Web Services will eventually detect that you have updated your DNS records; this detection process may take up to 72 hours. Upon successful detection, Amazon SES will be able to DKIM-sign emails originating from that domain.
For more information about creating DNS records using DKIM tokens, go to the Amazon SES Developer Guide.
(string) --
Returns a list containing all of the email addresses that have been verified.
This action is throttled at one request per second.
Request Syntax
client.list_verified_email_addresses()
dict
Response Syntax
{ 'VerifiedEmailAddresses': [ 'string', ] }
Response Structure
(dict) --
Represents a list of all the email addresses verified for the current user.
VerifiedEmailAddresses (list) --
A list of email addresses that have been verified.
(string) --
Verifies an email address. This action causes a confirmation email message to be sent to the specified address.
This action is throttled at one request per second.
Request Syntax
client.verify_email_identity( EmailAddress='string' )
string
[REQUIRED]
The email address to be verified.
dict
Response Syntax
{}
Response Structure
(dict) --
An empty element. Receiving this element indicates that the request completed successfully.
Given a list of verified identities (email addresses and/or domains), returns a structure describing identity notification attributes.
This action is throttled at one request per second and can only get notification attributes for up to 100 identities at a time.
For more information about using notifications with Amazon SES, see the Amazon SES Developer Guide.
Request Syntax
client.get_identity_notification_attributes( Identities=[ 'string', ] )
list
[REQUIRED]
A list of one or more identities.
(string) --
dict
Response Syntax
{ 'NotificationAttributes': { 'string': { 'BounceTopic': 'string', 'ComplaintTopic': 'string', 'DeliveryTopic': 'string', 'ForwardingEnabled': True|False } } }
Response Structure
(dict) --
Describes whether an identity has Amazon Simple Notification Service (Amazon SNS) topics set for bounce, complaint, and/or delivery notifications, and specifies whether feedback forwarding is enabled for bounce and complaint notifications.
NotificationAttributes (dict) --
A map of Identity to IdentityNotificationAttributes.
(string) --
(dict) --
Represents the notification attributes of an identity, including whether an identity has Amazon Simple Notification Service (Amazon SNS) topics set for bounce, complaint, and/or delivery notifications, and whether feedback forwarding is enabled for bounce and complaint notifications.
BounceTopic (string) --
The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES will publish bounce notifications.
ComplaintTopic (string) --
The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES will publish complaint notifications.
DeliveryTopic (string) --
The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES will publish delivery notifications.
ForwardingEnabled (boolean) --
Describes whether Amazon SES will forward bounce and complaint notifications as email. true indicates that Amazon SES will forward bounce and complaint notifications as email, while false indicates that bounce and complaint notifications will be published only to the specified bounce and complaint Amazon SNS topics.