SESV2 / Client / create_deliverability_test_report
create_deliverability_test_report#
- SESV2.Client.create_deliverability_test_report(**kwargs)#
Create a new predictive inbox placement test. Predictive inbox placement tests can help you predict how your messages will be handled by various email providers around the world. When you perform a predictive inbox placement test, you provide a sample message that contains the content that you plan to send to your customers. Amazon SES then sends that message to special email addresses spread across several major email providers. After about 24 hours, the test is complete, and you can use the
GetDeliverabilityTestReport
operation to view the results of the test.See also: AWS API Documentation
Request Syntax
response = client.create_deliverability_test_report( ReportName='string', FromEmailAddress='string', Content={ 'Simple': { 'Subject': { 'Data': 'string', 'Charset': 'string' }, 'Body': { 'Text': { 'Data': 'string', 'Charset': 'string' }, 'Html': { 'Data': 'string', 'Charset': 'string' } }, 'Headers': [ { 'Name': 'string', 'Value': 'string' }, ] }, 'Raw': { 'Data': b'bytes' }, 'Template': { 'TemplateName': 'string', 'TemplateArn': 'string', 'TemplateContent': { 'Subject': 'string', 'Text': 'string', 'Html': 'string' }, 'TemplateData': 'string', 'Headers': [ { 'Name': 'string', 'Value': 'string' }, ] } }, Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
- Parameters:
ReportName (string) – A unique name that helps you to identify the predictive inbox placement test when you retrieve the results.
FromEmailAddress (string) –
[REQUIRED]
The email address that the predictive inbox placement test email was sent from.
Content (dict) –
[REQUIRED]
The HTML body of the message that you sent when you performed the predictive inbox placement test.
Simple (dict) –
The simple email message. The message consists of a subject and a message body.
Subject (dict) – [REQUIRED]
The subject line of the email. The subject line can only contain 7-bit ASCII characters. However, you can specify non-ASCII characters in the subject line by using encoded-word syntax, as described in RFC 2047.
Data (string) – [REQUIRED]
The content of the message itself.
Charset (string) –
The character set for the content. Because of the constraints of the SMTP protocol, Amazon SES uses 7-bit ASCII by default. If the text includes characters outside of the ASCII range, you have to specify a character set. For example, you could specify
UTF-8
,ISO-8859-1
, orShift_JIS
.
Body (dict) – [REQUIRED]
The body of the message. You can specify an HTML version of the message, a text-only version of the message, or both.
Text (dict) –
An object that represents the version of the message that is displayed in email clients that don’t support HTML, or clients where the recipient has disabled HTML rendering.
Data (string) – [REQUIRED]
The content of the message itself.
Charset (string) –
The character set for the content. Because of the constraints of the SMTP protocol, Amazon SES uses 7-bit ASCII by default. If the text includes characters outside of the ASCII range, you have to specify a character set. For example, you could specify
UTF-8
,ISO-8859-1
, orShift_JIS
.
Html (dict) –
An object that represents the version of the message that is displayed in email clients that support HTML. HTML messages can include formatted text, hyperlinks, images, and more.
Data (string) – [REQUIRED]
The content of the message itself.
Charset (string) –
The character set for the content. Because of the constraints of the SMTP protocol, Amazon SES uses 7-bit ASCII by default. If the text includes characters outside of the ASCII range, you have to specify a character set. For example, you could specify
UTF-8
,ISO-8859-1
, orShift_JIS
.
Headers (list) –
The list of message headers that will be added to the email message.
(dict) –
Contains the name and value of a message header that you add to an email.
Name (string) – [REQUIRED]
The name of the message header. The message header name has to meet the following criteria:
Can contain any printable ASCII character (33 - 126) except for colon (:).
Can contain no more than 126 characters.
Value (string) – [REQUIRED]
The value of the message header. The message header value has to meet the following criteria:
Can contain any printable ASCII character.
Can contain no more than 870 characters.
Raw (dict) –
The raw email message. The message has to meet the following criteria:
The message has to contain a header and a body, separated by one blank line.
All of the required header fields must be present in the message.
Each part of a multipart MIME message must be formatted properly.
If you include attachments, they must be in a file format that the Amazon SES API v2 supports.
The raw data of the message needs to base64-encoded if you are accessing Amazon SES directly through the HTTPS interface. If you are accessing Amazon SES using an Amazon Web Services SDK, the SDK takes care of the base 64-encoding for you.
If any of the MIME parts in your message contain content that is outside of the 7-bit ASCII character range, you should encode that content to ensure that recipients’ email clients render the message properly.
The length of any single line of text in the message can’t exceed 1,000 characters. This restriction is defined in RFC 5321.
Data (bytes) – [REQUIRED]
The raw email message. The message has to meet the following criteria:
The message has to contain a header and a body, separated by one blank line.
All of the required header fields must be present in the message.
Each part of a multipart MIME message must be formatted properly.
Attachments must be in a file format that the Amazon SES supports.
The raw data of the message needs to base64-encoded if you are accessing Amazon SES directly through the HTTPS interface. If you are accessing Amazon SES using an Amazon Web Services SDK, the SDK takes care of the base 64-encoding for you.
If any of the MIME parts in your message contain content that is outside of the 7-bit ASCII character range, you should encode that content to ensure that recipients’ email clients render the message properly.
The length of any single line of text in the message can’t exceed 1,000 characters. This restriction is defined in RFC 5321.
Template (dict) –
The template to use for the email message.
TemplateName (string) –
The name of the template. You will refer to this name when you send email using the
SendTemplatedEmail
orSendBulkTemplatedEmail
operations.TemplateArn (string) –
The Amazon Resource Name (ARN) of the template.
TemplateContent (dict) –
The content of the template.
Note
Amazon SES supports only simple substitions when you send email using the
SendEmail
orSendBulkEmail
operations and you provide the full template content in the request.Subject (string) –
The subject line of the email.
Text (string) –
The email body that will be visible to recipients whose email clients do not display HTML.
Html (string) –
The HTML body of the email.
TemplateData (string) –
An object that defines the values to use for message variables in the template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the value to use for that variable.
Headers (list) –
The list of message headers that will be added to the email message.
(dict) –
Contains the name and value of a message header that you add to an email.
Name (string) – [REQUIRED]
The name of the message header. The message header name has to meet the following criteria:
Can contain any printable ASCII character (33 - 126) except for colon (:).
Can contain no more than 126 characters.
Value (string) – [REQUIRED]
The value of the message header. The message header value has to meet the following criteria:
Can contain any printable ASCII character.
Can contain no more than 870 characters.
Tags (list) –
An array of objects that define the tags (keys and values) that you want to associate with the predictive inbox placement test.
(dict) –
An object that defines the tags that are associated with a resource. A tag is a label that you optionally define and associate with a resource. Tags can help you categorize and manage resources in different ways, such as by purpose, owner, environment, or other criteria. A resource can have as many as 50 tags.
Each tag consists of a required tag key and an associated tag value, both of which you define. A tag key is a general label that acts as a category for a more specific tag value. A tag value acts as a descriptor within a tag key. A tag key can contain as many as 128 characters. A tag value can contain as many as 256 characters. The characters can be Unicode letters, digits, white space, or one of the following symbols: _ . : / = + -. The following additional restrictions apply to tags:
Tag keys and values are case sensitive.
For each associated resource, each tag key must be unique and it can have only one value.
The
aws:
prefix is reserved for use by Amazon Web Services; you can’t use it in any tag keys or values that you define. In addition, you can’t edit or remove tag keys or values that use this prefix. Tags that use this prefix don’t count against the limit of 50 tags per resource.You can associate tags with public or shared resources, but the tags are available only for your Amazon Web Services account, not any other accounts that share the resource. In addition, the tags are available only for resources that are located in the specified Amazon Web Services Region for your Amazon Web Services account.
Key (string) – [REQUIRED]
One part of a key-value pair that defines a tag. The maximum length of a tag key is 128 characters. The minimum length is 1 character.
Value (string) – [REQUIRED]
The optional part of a key-value pair that defines a tag. The maximum length of a tag value is 256 characters. The minimum length is 0 characters. If you don’t want a resource to have a specific tag value, don’t specify a value for this parameter. If you don’t specify a value, Amazon SES sets the value to an empty string.
- Return type:
dict
- Returns:
Response Syntax
{ 'ReportId': 'string', 'DeliverabilityTestStatus': 'IN_PROGRESS'|'COMPLETED' }
Response Structure
(dict) –
Information about the predictive inbox placement test that you created.
ReportId (string) –
A unique string that identifies the predictive inbox placement test.
DeliverabilityTestStatus (string) –
The status of the predictive inbox placement test. If the status is
IN_PROGRESS
, then the predictive inbox placement test is currently running. Predictive inbox placement tests are usually complete within 24 hours of creating the test. If the status isCOMPLETE
, then the test is finished, and you can use theGetDeliverabilityTestReport
to view the results of the test.
Exceptions
SESV2.Client.exceptions.AccountSuspendedException
SESV2.Client.exceptions.SendingPausedException
SESV2.Client.exceptions.MessageRejected
SESV2.Client.exceptions.MailFromDomainNotVerifiedException
SESV2.Client.exceptions.NotFoundException
SESV2.Client.exceptions.TooManyRequestsException
SESV2.Client.exceptions.LimitExceededException
SESV2.Client.exceptions.BadRequestException
SESV2.Client.exceptions.ConcurrentModificationException