Amazon Simple Email Service

2020/07/30 - Amazon Simple Email Service - 18 new 4 updated api methods

Changes  This release makes more API operations available to customers in version 2 of the Amazon SES API. With these additions, customers can now access sending authorization, custom verification email, and template API operations. With this release, Amazon SES is also providing new and updated APIs to allow customers to request production access.

ListEmailTemplates (new) Link ¶

Lists the email templates present in your Amazon SES account in the current AWS Region.

You can execute this operation no more than once per second.

See also: AWS API Documentation

Request Syntax

client.list_email_templates(
    NextToken='string',
    PageSize=123
)
type NextToken

string

param NextToken

A token returned from a previous call to ListEmailTemplates to indicate the position in the list of email templates.

type PageSize

integer

param PageSize

The number of results to show in a single call to ListEmailTemplates . If the number of results is larger than the number you specified in this parameter, then the response includes a NextToken element, which you can use to obtain additional results.

The value you specify has to be at least 1, and can be no more than 10.

rtype

dict

returns

Response Syntax

{
    'TemplatesMetadata': [
        {
            'TemplateName': 'string',
            'CreatedTimestamp': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    The following elements are returned by the service.

    • TemplatesMetadata (list) --

      An array the contains the name and creation time stamp for each template in your Amazon SES account.

      • (dict) --

        Contains information about an email template.

        • TemplateName (string) --

          The name of the template.

        • CreatedTimestamp (datetime) --

          The time and date the template was created.

    • NextToken (string) --

      A token indicating that there are additional email templates available to be listed. Pass this token to a subsequent ListEmailTemplates call to retrieve the next 10 email templates.

DeleteEmailIdentityPolicy (new) Link ¶

Deletes the specified sending authorization policy for the given identity (an email address or a domain). This API returns successfully even if a policy with the specified name does not exist.

Note

This API is for the identity owner only. If you have not verified the identity, this API will return an error.

Sending authorization is a feature that enables an identity owner to authorize other senders to use its identities. For information about using sending authorization, see the Amazon SES Developer Guide.

You can execute this operation no more than once per second.

See also: AWS API Documentation

Request Syntax

client.delete_email_identity_policy(
    EmailIdentity='string',
    PolicyName='string'
)
type EmailIdentity

string

param EmailIdentity

[REQUIRED]

The email identity for which you want to delete a policy.

type PolicyName

string

param PolicyName

[REQUIRED]

The name of the policy.

The policy name cannot exceed 64 characters and can only include alphanumeric characters, dashes, and underscores.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

    An HTTP 200 response if the request succeeds, or an error message if the request fails.

GetEmailIdentityPolicies (new) Link ¶

Returns the requested sending authorization policies for the given identity (an email address or a domain). The policies are returned as a map of policy names to policy contents. You can retrieve a maximum of 20 policies at a time.

Note

This API is for the identity owner only. If you have not verified the identity, this API will return an error.

Sending authorization is a feature that enables an identity owner to authorize other senders to use its identities. For information about using sending authorization, see the Amazon SES Developer Guide.

You can execute this operation no more than once per second.

See also: AWS API Documentation

Request Syntax

client.get_email_identity_policies(
    EmailIdentity='string'
)
type EmailIdentity

string

param EmailIdentity

[REQUIRED]

The email identity that you want to retrieve policies for.

rtype

dict

returns

Response Syntax

{
    'Policies': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    Identity policies associated with email identity.

    • Policies (dict) --

      A map of policy names to policies.

      • (string) --

        The name of the policy.

        The policy name cannot exceed 64 characters and can only include alphanumeric characters, dashes, and underscores.

        • (string) --

          The text of the policy in JSON format. The policy cannot exceed 4 KB.

          For information about the syntax of sending authorization policies, see the Amazon SES Developer Guide.

PutAccountDetails (new) Link ¶

Update your Amazon SES account details.

See also: AWS API Documentation

Request Syntax

client.put_account_details(
    MailType='MARKETING'|'TRANSACTIONAL',
    WebsiteURL='string',
    ContactLanguage='EN'|'JA',
    UseCaseDescription='string',
    AdditionalContactEmailAddresses=[
        'string',
    ],
    ProductionAccessEnabled=True|False
)
type MailType

string

param MailType

[REQUIRED]

The type of email your account will send.

type WebsiteURL

string

param WebsiteURL

[REQUIRED]

The URL of your website. This information helps us better understand the type of content that you plan to send.

type ContactLanguage

string

param ContactLanguage

The language you would prefer to be contacted with.

type UseCaseDescription

string

param UseCaseDescription

[REQUIRED]

A description of the types of email that you plan to send.

type AdditionalContactEmailAddresses

list

param AdditionalContactEmailAddresses

Additional email addresses that you would like to be notified regarding Amazon SES matters.

  • (string) --

type ProductionAccessEnabled

boolean

param ProductionAccessEnabled

Indicates whether or not your account should have production access in the current AWS Region.

If the value is false , then your account is in the sandbox . When your account is in the sandbox, you can only send email to verified identities. Additionally, the maximum number of emails you can send in a 24-hour period (your sending quota) is 200, and the maximum number of emails you can send per second (your maximum sending rate) is 1.

If the value is true , then your account has production access. When your account has production access, you can send email to any address. The sending quota and maximum sending rate for your account vary based on your specific use case.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

    An HTTP 200 response if the request succeeds, or an error message if the request fails.

GetCustomVerificationEmailTemplate (new) Link ¶

Returns the custom email verification template for the template name you specify.

For more information about custom verification email templates, see Using Custom Verification Email Templates in the Amazon SES Developer Guide .

You can execute this operation no more than once per second.

See also: AWS API Documentation

Request Syntax

client.get_custom_verification_email_template(
    TemplateName='string'
)
type TemplateName

string

param TemplateName

[REQUIRED]

The name of the custom verification email template that you want to retrieve.

rtype

dict

returns

Response Syntax

{
    'TemplateName': 'string',
    'FromEmailAddress': 'string',
    'TemplateSubject': 'string',
    'TemplateContent': 'string',
    'SuccessRedirectionURL': 'string',
    'FailureRedirectionURL': 'string'
}

Response Structure

  • (dict) --

    The following elements are returned by the service.

    • TemplateName (string) --

      The name of the custom verification email template.

    • FromEmailAddress (string) --

      The email address that the custom verification email is sent from.

    • TemplateSubject (string) --

      The subject line of the custom verification email.

    • TemplateContent (string) --

      The content of the custom verification email.

    • SuccessRedirectionURL (string) --

      The URL that the recipient of the verification email is sent to if his or her address is successfully verified.

    • FailureRedirectionURL (string) --

      The URL that the recipient of the verification email is sent to if his or her address is not successfully verified.

ListCustomVerificationEmailTemplates (new) Link ¶

Lists the existing custom verification email templates for your account in the current AWS Region.

For more information about custom verification email templates, see Using Custom Verification Email Templates in the Amazon SES Developer Guide .

You can execute this operation no more than once per second.

See also: AWS API Documentation

Request Syntax

client.list_custom_verification_email_templates(
    NextToken='string',
    PageSize=123
)
type NextToken

string

param NextToken

A token returned from a previous call to ListCustomVerificationEmailTemplates to indicate the position in the list of custom verification email templates.

type PageSize

integer

param PageSize

The number of results to show in a single call to ListCustomVerificationEmailTemplates . If the number of results is larger than the number you specified in this parameter, then the response includes a NextToken element, which you can use to obtain additional results.

The value you specify has to be at least 1, and can be no more than 50.

rtype

dict

returns

Response Syntax

{
    'CustomVerificationEmailTemplates': [
        {
            'TemplateName': 'string',
            'FromEmailAddress': 'string',
            'TemplateSubject': 'string',
            'SuccessRedirectionURL': 'string',
            'FailureRedirectionURL': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    The following elements are returned by the service.

    • CustomVerificationEmailTemplates (list) --

      A list of the custom verification email templates that exist in your account.

      • (dict) --

        Contains information about a custom verification email template.

        • TemplateName (string) --

          The name of the custom verification email template.

        • FromEmailAddress (string) --

          The email address that the custom verification email is sent from.

        • TemplateSubject (string) --

          The subject line of the custom verification email.

        • SuccessRedirectionURL (string) --

          The URL that the recipient of the verification email is sent to if his or her address is successfully verified.

        • FailureRedirectionURL (string) --

          The URL that the recipient of the verification email is sent to if his or her address is not successfully verified.

    • NextToken (string) --

      A token indicating that there are additional custom verification email templates available to be listed. Pass this token to a subsequent call to ListCustomVerificationEmailTemplates to retrieve the next 50 custom verification email templates.

DeleteCustomVerificationEmailTemplate (new) Link ¶

Deletes an existing custom verification email template.

For more information about custom verification email templates, see Using Custom Verification Email Templates in the Amazon SES Developer Guide .

You can execute this operation no more than once per second.

See also: AWS API Documentation

Request Syntax

client.delete_custom_verification_email_template(
    TemplateName='string'
)
type TemplateName

string

param TemplateName

[REQUIRED]

The name of the custom verification email template that you want to delete.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

    If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

TestRenderEmailTemplate (new) Link ¶

Creates a preview of the MIME content of an email when provided with a template and a set of replacement data.

You can execute this operation no more than once per second.

See also: AWS API Documentation

Request Syntax

client.test_render_email_template(
    TemplateName='string',
    TemplateData='string'
)
type TemplateName

string

param TemplateName

[REQUIRED]

The name of the template that you want to render.

type TemplateData

string

param TemplateData

[REQUIRED]

A list of replacement values to apply to the template. This parameter is a JSON object, typically consisting of key-value pairs in which the keys correspond to replacement tags in the email template.

rtype

dict

returns

Response Syntax

{
    'RenderedTemplate': 'string'
}

Response Structure

  • (dict) --

    The following element is returned by the service.

    • RenderedTemplate (string) --

      The complete MIME message rendered by applying the data in the TemplateData parameter to the template specified in the TemplateName parameter.

UpdateCustomVerificationEmailTemplate (new) Link ¶

Updates an existing custom verification email template.

For more information about custom verification email templates, see Using Custom Verification Email Templates in the Amazon SES Developer Guide .

You can execute this operation no more than once per second.

See also: AWS API Documentation

Request Syntax

client.update_custom_verification_email_template(
    TemplateName='string',
    FromEmailAddress='string',
    TemplateSubject='string',
    TemplateContent='string',
    SuccessRedirectionURL='string',
    FailureRedirectionURL='string'
)
type TemplateName

string

param TemplateName

[REQUIRED]

The name of the custom verification email template that you want to update.

type FromEmailAddress

string

param FromEmailAddress

[REQUIRED]

The email address that the custom verification email is sent from.

type TemplateSubject

string

param TemplateSubject

[REQUIRED]

The subject line of the custom verification email.

type TemplateContent

string

param TemplateContent

[REQUIRED]

The content of the custom verification email. The total size of the email must be less than 10 MB. The message body may contain HTML, with some limitations. For more information, see Custom Verification Email Frequently Asked Questions in the Amazon SES Developer Guide .

type SuccessRedirectionURL

string

param SuccessRedirectionURL

[REQUIRED]

The URL that the recipient of the verification email is sent to if his or her address is successfully verified.

type FailureRedirectionURL

string

param FailureRedirectionURL

[REQUIRED]

The URL that the recipient of the verification email is sent to if his or her address is not successfully verified.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

    If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

DeleteEmailTemplate (new) Link ¶

Deletes an email template.

You can execute this operation no more than once per second.

See also: AWS API Documentation

Request Syntax

client.delete_email_template(
    TemplateName='string'
)
type TemplateName

string

param TemplateName

[REQUIRED]

The name of the template to be deleted.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

    If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

SendCustomVerificationEmail (new) Link ¶

Adds an email address to the list of identities for your Amazon SES account in the current AWS Region and attempts to verify it. As a result of executing this operation, a customized verification email is sent to the specified address.

To use this operation, you must first create a custom verification email template. For more information about creating and using custom verification email templates, see Using Custom Verification Email Templates in the Amazon SES Developer Guide .

You can execute this operation no more than once per second.

See also: AWS API Documentation

Request Syntax

client.send_custom_verification_email(
    EmailAddress='string',
    TemplateName='string',
    ConfigurationSetName='string'
)
type EmailAddress

string

param EmailAddress

[REQUIRED]

The email address to verify.

type TemplateName

string

param TemplateName

[REQUIRED]

The name of the custom verification email template to use when sending the verification email.

type ConfigurationSetName

string

param ConfigurationSetName

Name of a configuration set to use when sending the verification email.

rtype

dict

returns

Response Syntax

{
    'MessageId': 'string'
}

Response Structure

  • (dict) --

    The following element is returned by the service.

    • MessageId (string) --

      The unique message identifier returned from the SendCustomVerificationEmail operation.

CreateEmailTemplate (new) Link ¶

Creates an email template. Email templates enable you to send personalized email to one or more destinations in a single API operation. For more information, see the Amazon SES Developer Guide.

You can execute this operation no more than once per second.

See also: AWS API Documentation

Request Syntax

client.create_email_template(
    TemplateName='string',
    TemplateContent={
        'Subject': 'string',
        'Text': 'string',
        'Html': 'string'
    }
)
type TemplateName

string

param TemplateName

[REQUIRED]

The name of the template you want to create.

type TemplateContent

dict

param TemplateContent

[REQUIRED]

The content of the email template, composed of a subject line, an HTML part, and a text-only part.

  • 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.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

    If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

UpdateEmailTemplate (new) Link ¶

Updates an email template. Email templates enable you to send personalized email to one or more destinations in a single API operation. For more information, see the Amazon SES Developer Guide.

You can execute this operation no more than once per second.

See also: AWS API Documentation

Request Syntax

client.update_email_template(
    TemplateName='string',
    TemplateContent={
        'Subject': 'string',
        'Text': 'string',
        'Html': 'string'
    }
)
type TemplateName

string

param TemplateName

[REQUIRED]

The name of the template you want to update.

type TemplateContent

dict

param TemplateContent

[REQUIRED]

The content of the email template, composed of a subject line, an HTML part, and a text-only part.

  • 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.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

    If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

UpdateEmailIdentityPolicy (new) Link ¶

Updates the specified sending authorization policy for the given identity (an email address or a domain). This API returns successfully even if a policy with the specified name does not exist.

Note

This API is for the identity owner only. If you have not verified the identity, this API will return an error.

Sending authorization is a feature that enables an identity owner to authorize other senders to use its identities. For information about using sending authorization, see the Amazon SES Developer Guide.

You can execute this operation no more than once per second.

See also: AWS API Documentation

Request Syntax

client.update_email_identity_policy(
    EmailIdentity='string',
    PolicyName='string',
    Policy='string'
)
type EmailIdentity

string

param EmailIdentity

[REQUIRED]

The email identity for which you want to update policy.

type PolicyName

string

param PolicyName

[REQUIRED]

The name of the policy.

The policy name cannot exceed 64 characters and can only include alphanumeric characters, dashes, and underscores.

type Policy

string

param Policy

[REQUIRED]

The text of the policy in JSON format. The policy cannot exceed 4 KB.

For information about the syntax of sending authorization policies, see the Amazon SES Developer Guide.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

    An HTTP 200 response if the request succeeds, or an error message if the request fails.

CreateEmailIdentityPolicy (new) Link ¶

Creates the specified sending authorization policy for the given identity (an email address or a domain).

Note

This API is for the identity owner only. If you have not verified the identity, this API will return an error.

Sending authorization is a feature that enables an identity owner to authorize other senders to use its identities. For information about using sending authorization, see the Amazon SES Developer Guide.

You can execute this operation no more than once per second.

See also: AWS API Documentation

Request Syntax

client.create_email_identity_policy(
    EmailIdentity='string',
    PolicyName='string',
    Policy='string'
)
type EmailIdentity

string

param EmailIdentity

[REQUIRED]

The email identity for which you want to create a policy.

type PolicyName

string

param PolicyName

[REQUIRED]

The name of the policy.

The policy name cannot exceed 64 characters and can only include alphanumeric characters, dashes, and underscores.

type Policy

string

param Policy

[REQUIRED]

The text of the policy in JSON format. The policy cannot exceed 4 KB.

For information about the syntax of sending authorization policies, see the Amazon SES Developer Guide.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

    An HTTP 200 response if the request succeeds, or an error message if the request fails.

GetEmailTemplate (new) Link ¶

Displays the template object (which includes the subject line, HTML part and text part) for the template you specify.

You can execute this operation no more than once per second.

See also: AWS API Documentation

Request Syntax

client.get_email_template(
    TemplateName='string'
)
type TemplateName

string

param TemplateName

[REQUIRED]

The name of the template you want to retrieve.

rtype

dict

returns

Response Syntax

{
    'TemplateName': 'string',
    'TemplateContent': {
        'Subject': 'string',
        'Text': 'string',
        'Html': 'string'
    }
}

Response Structure

  • (dict) --

    The following element is returned by the service.

    • TemplateName (string) --

      The name of the template you want to retrieve.

    • TemplateContent (dict) --

      The content of the email template, composed of a subject line, an HTML part, and a text-only part.

      • 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.

CreateCustomVerificationEmailTemplate (new) Link ¶

Creates a new custom verification email template.

For more information about custom verification email templates, see Using Custom Verification Email Templates in the Amazon SES Developer Guide .

You can execute this operation no more than once per second.

See also: AWS API Documentation

Request Syntax

client.create_custom_verification_email_template(
    TemplateName='string',
    FromEmailAddress='string',
    TemplateSubject='string',
    TemplateContent='string',
    SuccessRedirectionURL='string',
    FailureRedirectionURL='string'
)
type TemplateName

string

param TemplateName

[REQUIRED]

The name of the custom verification email template.

type FromEmailAddress

string

param FromEmailAddress

[REQUIRED]

The email address that the custom verification email is sent from.

type TemplateSubject

string

param TemplateSubject

[REQUIRED]

The subject line of the custom verification email.

type TemplateContent

string

param TemplateContent

[REQUIRED]

The content of the custom verification email. The total size of the email must be less than 10 MB. The message body may contain HTML, with some limitations. For more information, see Custom Verification Email Frequently Asked Questions in the Amazon SES Developer Guide .

type SuccessRedirectionURL

string

param SuccessRedirectionURL

[REQUIRED]

The URL that the recipient of the verification email is sent to if his or her address is successfully verified.

type FailureRedirectionURL

string

param FailureRedirectionURL

[REQUIRED]

The URL that the recipient of the verification email is sent to if his or her address is not successfully verified.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

    If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

SendBulkEmail (new) Link ¶

Composes an email message to multiple destinations.

See also: AWS API Documentation

Request Syntax

client.send_bulk_email(
    FromEmailAddress='string',
    FromEmailAddressIdentityArn='string',
    ReplyToAddresses=[
        'string',
    ],
    FeedbackForwardingEmailAddress='string',
    FeedbackForwardingEmailAddressIdentityArn='string',
    DefaultEmailTags=[
        {
            'Name': 'string',
            'Value': 'string'
        },
    ],
    DefaultContent={
        'Template': {
            'TemplateName': 'string',
            'TemplateArn': 'string',
            'TemplateData': 'string'
        }
    },
    BulkEmailEntries=[
        {
            'Destination': {
                'ToAddresses': [
                    'string',
                ],
                'CcAddresses': [
                    'string',
                ],
                'BccAddresses': [
                    'string',
                ]
            },
            'ReplacementTags': [
                {
                    'Name': 'string',
                    'Value': 'string'
                },
            ],
            'ReplacementEmailContent': {
                'ReplacementTemplate': {
                    'ReplacementTemplateData': 'string'
                }
            }
        },
    ],
    ConfigurationSetName='string'
)
type FromEmailAddress

string

param FromEmailAddress

The email address that you want to use as the "From" address for the email. The address that you specify has to be verified.

type FromEmailAddressIdentityArn

string

param FromEmailAddressIdentityArn

This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to use the email address specified in the FromEmailAddress parameter.

For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) attaches a policy to it that authorizes you to use sender@example.com, then you would specify the FromEmailAddressIdentityArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the FromEmailAddress to be sender@example.com.

For more information about sending authorization, see the Amazon SES Developer Guide.

type ReplyToAddresses

list

param ReplyToAddresses

The "Reply-to" email addresses for the message. When the recipient replies to the message, each Reply-to address receives the reply.

  • (string) --

type FeedbackForwardingEmailAddress

string

param FeedbackForwardingEmailAddress

The address that you want bounce and complaint notifications to be sent to.

type FeedbackForwardingEmailAddressIdentityArn

string

param FeedbackForwardingEmailAddressIdentityArn

This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to use the email address specified in the FeedbackForwardingEmailAddress parameter.

For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) attaches a policy to it that authorizes you to use feedback@example.com, then you would specify the FeedbackForwardingEmailAddressIdentityArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the FeedbackForwardingEmailAddress to be feedback@example.com.

For more information about sending authorization, see the Amazon SES Developer Guide.

type DefaultEmailTags

list

param DefaultEmailTags

A list of tags, in the form of name/value pairs, to apply to an email that you send using the SendEmail operation. Tags correspond to characteristics of the email that you define, so that you can publish email sending events.

  • (dict) --

    Contains the name and value of a tag that you apply to an email. You can use message tags when you publish email sending events.

    • Name (string) -- [REQUIRED]

      The name of the message tag. The message tag name has to meet the following criteria:

      • It can only contain ASCII letters (a–z, A–Z), numbers (0–9), underscores (_), or dashes (-).

      • It can contain no more than 256 characters.

    • Value (string) -- [REQUIRED]

      The value of the message tag. The message tag value has to meet the following criteria:

      • It can only contain ASCII letters (a–z, A–Z), numbers (0–9), underscores (_), or dashes (-).

      • It can contain no more than 256 characters.

type DefaultContent

dict

param DefaultContent

[REQUIRED]

An object that contains the body of the message. You can specify a template message.

  • Template (dict) --

    The template to use for the bulk email message.

    • TemplateName (string) --

      The name of the template. You will refer to this name when you send email using the SendTemplatedEmail or SendBulkTemplatedEmail operations.

    • TemplateArn (string) --

      The Amazon Resource Name (ARN) of the template.

    • 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.

type BulkEmailEntries

list

param BulkEmailEntries

[REQUIRED]

The list of bulk email entry objects.

  • (dict) --

    • Destination (dict) -- [REQUIRED]

      Represents the destination of the message, consisting of To:, CC:, and BCC: fields.

      Note

      Amazon SES does not support the SMTPUTF8 extension, as described in RFC6531. For this reason, the local part of a destination email address (the part of the email address that precedes the @ sign) may only contain 7-bit ASCII characters. If the domain part of an address (the part after the @ sign) contains non-ASCII characters, they must be encoded using Punycode, as described in RFC3492.

      • ToAddresses (list) --

        An array that contains the email addresses of the "To" recipients for the email.

        • (string) --

      • CcAddresses (list) --

        An array that contains the email addresses of the "CC" (carbon copy) recipients for the email.

        • (string) --

      • BccAddresses (list) --

        An array that contains the email addresses of the "BCC" (blind carbon copy) recipients for the email.

        • (string) --

    • ReplacementTags (list) --

      A list of tags, in the form of name/value pairs, to apply to an email that you send using the SendBulkTemplatedEmail operation. Tags correspond to characteristics of the email that you define, so that you can publish email sending events.

      • (dict) --

        Contains the name and value of a tag that you apply to an email. You can use message tags when you publish email sending events.

        • Name (string) -- [REQUIRED]

          The name of the message tag. The message tag name has to meet the following criteria:

          • It can only contain ASCII letters (a–z, A–Z), numbers (0–9), underscores (_), or dashes (-).

          • It can contain no more than 256 characters.

        • Value (string) -- [REQUIRED]

          The value of the message tag. The message tag value has to meet the following criteria:

          • It can only contain ASCII letters (a–z, A–Z), numbers (0–9), underscores (_), or dashes (-).

          • It can contain no more than 256 characters.

    • ReplacementEmailContent (dict) --

      The ReplacementEmailContent associated with a BulkEmailEntry .

      • ReplacementTemplate (dict) --

        The ReplacementTemplate associated with ReplacementEmailContent .

        • ReplacementTemplateData (string) --

          A list of replacement values to apply to the template. This parameter is a JSON object, typically consisting of key-value pairs in which the keys correspond to replacement tags in the email template.

type ConfigurationSetName

string

param ConfigurationSetName

The name of the configuration set that you want to use when sending the email.

rtype

dict

returns

Response Syntax

{
    'BulkEmailEntryResults': [
        {
            'Status': 'SUCCESS'|'MESSAGE_REJECTED'|'MAIL_FROM_DOMAIN_NOT_VERIFIED'|'CONFIGURATION_SET_NOT_FOUND'|'TEMPLATE_NOT_FOUND'|'ACCOUNT_SUSPENDED'|'ACCOUNT_THROTTLED'|'ACCOUNT_DAILY_QUOTA_EXCEEDED'|'INVALID_SENDING_POOL_NAME'|'ACCOUNT_SENDING_PAUSED'|'CONFIGURATION_SET_SENDING_PAUSED'|'INVALID_PARAMETER'|'TRANSIENT_FAILURE'|'FAILED',
            'Error': 'string',
            'MessageId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    The following data is returned in JSON format by the service.

    • BulkEmailEntryResults (list) --

      A list of BulkMailEntry objects.

      • (dict) --

        The result of the SendBulkEmail operation of each specified BulkEmailEntry .

        • Status (string) --

          The status of a message sent using the SendBulkTemplatedEmail operation.

          Possible values for this parameter include:

          • SUCCESS: Amazon SES accepted the message, and will attempt to deliver it to the recipients.

          • MESSAGE_REJECTED: The message was rejected because it contained a virus.

          • MAIL_FROM_DOMAIN_NOT_VERIFIED: The sender's email address or domain was not verified.

          • CONFIGURATION_SET_DOES_NOT_EXIST: The configuration set you specified does not exist.

          • TEMPLATE_DOES_NOT_EXIST: The template you specified does not exist.

          • ACCOUNT_SUSPENDED: Your account has been shut down because of issues related to your email sending practices.

          • ACCOUNT_THROTTLED: The number of emails you can send has been reduced because your account has exceeded its allocated sending limit.

          • ACCOUNT_DAILY_QUOTA_EXCEEDED: You have reached or exceeded the maximum number of emails you can send from your account in a 24-hour period.

          • INVALID_SENDING_POOL_NAME: The configuration set you specified refers to an IP pool that does not exist.

          • ACCOUNT_SENDING_PAUSED: Email sending for the Amazon SES account was disabled using the UpdateAccountSendingEnabled operation.

          • CONFIGURATION_SET_SENDING_PAUSED: Email sending for this configuration set was disabled using the UpdateConfigurationSetSendingEnabled operation.

          • INVALID_PARAMETER_VALUE: One or more of the parameters you specified when calling this operation was invalid. See the error message for additional information.

          • TRANSIENT_FAILURE: Amazon SES was unable to process your request because of a temporary issue.

          • FAILED: Amazon SES was unable to process your request. See the error message for additional information.

        • Error (string) --

          A description of an error that prevented a message being sent using the SendBulkTemplatedEmail operation.

        • MessageId (string) --

          The unique message identifier returned from the SendBulkTemplatedEmail operation.

CreateDeliverabilityTestReport (updated) Link ¶
Changes (request)
{'Content': {'Template': {'TemplateName': 'string'}}}

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

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'
                }
            }
        },
        'Raw': {
            'Data': b'bytes'
        },
        'Template': {
            'TemplateName': 'string',
            'TemplateArn': 'string',
            'TemplateData': 'string'
        }
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type ReportName

string

param ReportName

A unique name that helps you to identify the predictive inbox placement test when you retrieve the results.

type FromEmailAddress

string

param FromEmailAddress

[REQUIRED]

The email address that the predictive inbox placement test email was sent from.

type Content

dict

param Content

[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 , or Shift_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 , or Shift_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 , or Shift_JIS .

  • 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 entire message must be Base64 encoded.

    • 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 entire message must be Base64 encoded.

      • 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 or SendBulkTemplatedEmail operations.

    • TemplateArn (string) --

      The Amazon Resource Name (ARN) of the template.

    • 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.

type Tags

list

param Tags

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 AWS; 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 AWS account, not any other accounts that share the resource. In addition, the tags are available only for resources that are located in the specified AWS Region for your AWS 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.

rtype

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 is COMPLETE , then the test is finished, and you can use the GetDeliverabilityTestReport to view the results of the test.

GetAccount (updated) Link ¶
Changes (response)
{'Details': {'AdditionalContactEmailAddresses': ['string'],
             'ContactLanguage': 'EN | JA',
             'MailType': 'MARKETING | TRANSACTIONAL',
             'ReviewDetails': {'CaseId': 'string',
                               'Status': 'PENDING | FAILED | GRANTED | DENIED'},
             'UseCaseDescription': 'string',
             'WebsiteURL': 'string'}}

Obtain information about the email-sending status and capabilities of your Amazon SES account in the current AWS Region.

See also: AWS API Documentation

Request Syntax

client.get_account()
rtype

dict

returns

Response Syntax

{
    'DedicatedIpAutoWarmupEnabled': True|False,
    'EnforcementStatus': 'string',
    'ProductionAccessEnabled': True|False,
    'SendQuota': {
        'Max24HourSend': 123.0,
        'MaxSendRate': 123.0,
        'SentLast24Hours': 123.0
    },
    'SendingEnabled': True|False,
    'SuppressionAttributes': {
        'SuppressedReasons': [
            'BOUNCE'|'COMPLAINT',
        ]
    },
    'Details': {
        'MailType': 'MARKETING'|'TRANSACTIONAL',
        'WebsiteURL': 'string',
        'ContactLanguage': 'EN'|'JA',
        'UseCaseDescription': 'string',
        'AdditionalContactEmailAddresses': [
            'string',
        ],
        'ReviewDetails': {
            'Status': 'PENDING'|'FAILED'|'GRANTED'|'DENIED',
            'CaseId': 'string'
        }
    }
}

Response Structure

  • (dict) --

    A list of details about the email-sending capabilities of your Amazon SES account in the current AWS Region.

    • DedicatedIpAutoWarmupEnabled (boolean) --

      Indicates whether or not the automatic warm-up feature is enabled for dedicated IP addresses that are associated with your account.

    • EnforcementStatus (string) --

      The reputation status of your Amazon SES account. The status can be one of the following:

      • HEALTHY – There are no reputation-related issues that currently impact your account.

      • PROBATION – We've identified potential issues with your Amazon SES account. We're placing your account under review while you work on correcting these issues.

      • SHUTDOWN – Your account's ability to send email is currently paused because of an issue with the email sent from your account. When you correct the issue, you can contact us and request that your account's ability to send email is resumed.

    • ProductionAccessEnabled (boolean) --

      Indicates whether or not your account has production access in the current AWS Region.

      If the value is false , then your account is in the sandbox . When your account is in the sandbox, you can only send email to verified identities. Additionally, the maximum number of emails you can send in a 24-hour period (your sending quota) is 200, and the maximum number of emails you can send per second (your maximum sending rate) is 1.

      If the value is true , then your account has production access. When your account has production access, you can send email to any address. The sending quota and maximum sending rate for your account vary based on your specific use case.

    • SendQuota (dict) --

      An object that contains information about the per-day and per-second sending limits for your Amazon SES account in the current AWS Region.

      • Max24HourSend (float) --

        The maximum number of emails that you can send in the current AWS Region over a 24-hour period. This value is also called your sending quota .

      • MaxSendRate (float) --

        The maximum number of emails that you can send per second in the current AWS Region. This value is also called your maximum sending rate or your maximum TPS (transactions per second) rate .

      • SentLast24Hours (float) --

        The number of emails sent from your Amazon SES account in the current AWS Region over the past 24 hours.

    • SendingEnabled (boolean) --

      Indicates whether or not email sending is enabled for your Amazon SES account in the current AWS Region.

    • SuppressionAttributes (dict) --

      An object that contains information about the email address suppression preferences for your account in the current AWS Region.

      • SuppressedReasons (list) --

        A list that contains the reasons that email addresses will be automatically added to the suppression list for your account. This list can contain any or all of the following:

        • COMPLAINT – Amazon SES adds an email address to the suppression list for your account when a message sent to that address results in a complaint.

        • BOUNCE – Amazon SES adds an email address to the suppression list for your account when a message sent to that address results in a hard bounce.

        • (string) --

          The reason that the address was added to the suppression list for your account. The value can be one of the following:

          • COMPLAINT – Amazon SES added an email address to the suppression list for your account because a message sent to that address results in a complaint.

          • BOUNCE – Amazon SES added an email address to the suppression list for your account because a message sent to that address results in a hard bounce.

    • Details (dict) --

      An object that defines your account details.

      • MailType (string) --

        The type of email your account is sending. The mail type can be one of the following:

        • MARKETING – Most of your sending traffic is to keep your customers informed of your latest offering.

        • TRANSACTIONAL – Most of your sending traffic is to communicate during a transaction with a customer.

      • WebsiteURL (string) --

        The URL of your website. This information helps us better understand the type of content that you plan to send.

      • ContactLanguage (string) --

        The language you would prefer for the case. The contact language can be one of ENGLISH or JAPANESE .

      • UseCaseDescription (string) --

        A description of the types of email that you plan to send.

      • AdditionalContactEmailAddresses (list) --

        Additional email addresses where updates are sent about your account review process.

        • (string) --

      • ReviewDetails (dict) --

        Information about the review of the latest details you submitted.

        • Status (string) --

          The status of the latest review of your account. The status can be one of the following:

          • PENDING – We have received your appeal and are in the process of reviewing it.

          • GRANTED – Your appeal has been reviewed and your production access has been granted.

          • DENIED – Your appeal has been reviewed and your production access has been denied.

          • FAILED – An internal error occurred and we didn't receive your appeal. You can submit your appeal again.

        • CaseId (string) --

          The associated support center case ID (if any).

GetEmailIdentity (updated) Link ¶
Changes (response)
{'Policies': {'string': 'string'}}

Provides information about a specific identity, including the identity's verification status, sending authorization policies, its DKIM authentication status, and its custom Mail-From settings.

See also: AWS API Documentation

Request Syntax

client.get_email_identity(
    EmailIdentity='string'
)
type EmailIdentity

string

param EmailIdentity

[REQUIRED]

The email identity that you want to retrieve details for.

rtype

dict

returns

Response Syntax

{
    'IdentityType': 'EMAIL_ADDRESS'|'DOMAIN'|'MANAGED_DOMAIN',
    'FeedbackForwardingStatus': True|False,
    'VerifiedForSendingStatus': True|False,
    'DkimAttributes': {
        'SigningEnabled': True|False,
        'Status': 'PENDING'|'SUCCESS'|'FAILED'|'TEMPORARY_FAILURE'|'NOT_STARTED',
        'Tokens': [
            'string',
        ],
        'SigningAttributesOrigin': 'AWS_SES'|'EXTERNAL'
    },
    'MailFromAttributes': {
        'MailFromDomain': 'string',
        'MailFromDomainStatus': 'PENDING'|'SUCCESS'|'FAILED'|'TEMPORARY_FAILURE',
        'BehaviorOnMxFailure': 'USE_DEFAULT_VALUE'|'REJECT_MESSAGE'
    },
    'Policies': {
        'string': 'string'
    },
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    Details about an email identity.

    • IdentityType (string) --

      The email identity type.

    • FeedbackForwardingStatus (boolean) --

      The feedback forwarding configuration for the identity.

      If the value is true , you receive email notifications when bounce or complaint events occur. These notifications are sent to the address that you specified in the Return-Path header of the original email.

      You're required to have a method of tracking bounces and complaints. If you haven't set up another mechanism for receiving bounce or complaint notifications (for example, by setting up an event destination), you receive an email notification when these events occur (even if this setting is disabled).

    • VerifiedForSendingStatus (boolean) --

      Specifies whether or not the identity is verified. You can only send email from verified email addresses or domains. For more information about verifying identities, see the Amazon Pinpoint User Guide.

    • DkimAttributes (dict) --

      An object that contains information about the DKIM attributes for the identity.

      • SigningEnabled (boolean) --

        If the value is true , then the messages that you send from the identity are signed using DKIM. If the value is false , then the messages that you send from the identity aren't DKIM-signed.

      • Status (string) --

        Describes whether or not Amazon SES has successfully located the DKIM records in the DNS records for the domain. The status can be one of the following:

        • PENDING – The verification process was initiated, but Amazon SES hasn't yet detected the DKIM records in the DNS configuration for the domain.

        • SUCCESS – The verification process completed successfully.

        • FAILED – The verification process failed. This typically occurs when Amazon SES fails to find the DKIM records in the DNS configuration of the domain.

        • TEMPORARY_FAILURE – A temporary issue is preventing Amazon SES from determining the DKIM authentication status of the domain.

        • NOT_STARTED – The DKIM verification process hasn't been initiated for the domain.

      • Tokens (list) --

        If you used Easy DKIM to configure DKIM authentication for the domain, then this object contains a set of unique strings that you use to create a set of CNAME records that you add to the DNS configuration for your domain. When Amazon SES detects these records in the DNS configuration for your domain, the DKIM authentication process is complete.

        If you configured DKIM authentication for the domain by providing your own public-private key pair, then this object contains the selector for the public key.

        Regardless of the DKIM authentication method you use, Amazon SES searches for the appropriate records in the DNS configuration of the domain for up to 72 hours.

        • (string) --

      • SigningAttributesOrigin (string) --

        A string that indicates how DKIM was configured for the identity. There are two possible values:

        • AWS_SES – Indicates that DKIM was configured for the identity by using Easy DKIM.

        • EXTERNAL – Indicates that DKIM was configured for the identity by using Bring Your Own DKIM (BYODKIM).

    • MailFromAttributes (dict) --

      An object that contains information about the Mail-From attributes for the email identity.

      • MailFromDomain (string) --

        The name of a domain that an email identity uses as a custom MAIL FROM domain.

      • MailFromDomainStatus (string) --

        The status of the MAIL FROM domain. This status can have the following values:

        • PENDING – Amazon SES hasn't started searching for the MX record yet.

        • SUCCESS – Amazon SES detected the required MX record for the MAIL FROM domain.

        • FAILED – Amazon SES can't find the required MX record, or the record no longer exists.

        • TEMPORARY_FAILURE – A temporary issue occurred, which prevented Amazon SES from determining the status of the MAIL FROM domain.

      • BehaviorOnMxFailure (string) --

        The action that you want to take if the required MX record can't be found when you send an email. When you set this value to UseDefaultValue , the mail is sent using amazonses.com as the MAIL FROM domain. When you set this value to RejectMessage , the Amazon SES API v2 returns a MailFromDomainNotVerified error, and doesn't attempt to deliver the email.

        These behaviors are taken when the custom MAIL FROM domain configuration is in the Pending , Failed , and TemporaryFailure states.

    • Policies (dict) --

      A map of policy names to policies.

      • (string) --

        The name of the policy.

        The policy name cannot exceed 64 characters and can only include alphanumeric characters, dashes, and underscores.

        • (string) --

          The text of the policy in JSON format. The policy cannot exceed 4 KB.

          For information about the syntax of sending authorization policies, see the Amazon SES Developer Guide.

    • Tags (list) --

      An array of objects that define the tags (keys and values) that are associated with the email identity.

      • (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 AWS; 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 AWS account, not any other accounts that share the resource. In addition, the tags are available only for resources that are located in the specified AWS Region for your AWS account.

        • Key (string) --

          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) --

          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.

SendEmail (updated) Link ¶
Changes (request)
{'Content': {'Template': {'TemplateName': 'string'}},
 'FeedbackForwardingEmailAddressIdentityArn': 'string',
 'FromEmailAddressIdentityArn': 'string'}

Sends an email message. You can use the Amazon SES API v2 to send two types of messages:

  • Simple – A standard email message. When you create this type of message, you specify the sender, the recipient, and the message body, and Amazon SES assembles the message for you.

  • Raw – A raw, MIME-formatted email message. When you send this type of email, you have to specify all of the message headers, as well as the message body. You can use this message type to send messages that contain attachments. The message that you specify has to be a valid MIME message.

  • Templated – A message that contains personalization tags. When you send this type of email, Amazon SES API v2 automatically replaces the tags with values that you specify.

See also: AWS API Documentation

Request Syntax

client.send_email(
    FromEmailAddress='string',
    FromEmailAddressIdentityArn='string',
    Destination={
        'ToAddresses': [
            'string',
        ],
        'CcAddresses': [
            'string',
        ],
        'BccAddresses': [
            'string',
        ]
    },
    ReplyToAddresses=[
        'string',
    ],
    FeedbackForwardingEmailAddress='string',
    FeedbackForwardingEmailAddressIdentityArn='string',
    Content={
        'Simple': {
            'Subject': {
                'Data': 'string',
                'Charset': 'string'
            },
            'Body': {
                'Text': {
                    'Data': 'string',
                    'Charset': 'string'
                },
                'Html': {
                    'Data': 'string',
                    'Charset': 'string'
                }
            }
        },
        'Raw': {
            'Data': b'bytes'
        },
        'Template': {
            'TemplateName': 'string',
            'TemplateArn': 'string',
            'TemplateData': 'string'
        }
    },
    EmailTags=[
        {
            'Name': 'string',
            'Value': 'string'
        },
    ],
    ConfigurationSetName='string'
)
type FromEmailAddress

string

param FromEmailAddress

The email address that you want to use as the "From" address for the email. The address that you specify has to be verified.

type FromEmailAddressIdentityArn

string

param FromEmailAddressIdentityArn

This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to use the email address specified in the FromEmailAddress parameter.

For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) attaches a policy to it that authorizes you to use sender@example.com, then you would specify the FromEmailAddressIdentityArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the FromEmailAddress to be sender@example.com.

For more information about sending authorization, see the Amazon SES Developer Guide.

For Raw emails, the FromEmailAddressIdentityArn value overrides the X-SES-SOURCE-ARN and X-SES-FROM-ARN headers specified in raw email message content.

type Destination

dict

param Destination

An object that contains the recipients of the email message.

  • ToAddresses (list) --

    An array that contains the email addresses of the "To" recipients for the email.

    • (string) --

  • CcAddresses (list) --

    An array that contains the email addresses of the "CC" (carbon copy) recipients for the email.

    • (string) --

  • BccAddresses (list) --

    An array that contains the email addresses of the "BCC" (blind carbon copy) recipients for the email.

    • (string) --

type ReplyToAddresses

list

param ReplyToAddresses

The "Reply-to" email addresses for the message. When the recipient replies to the message, each Reply-to address receives the reply.

  • (string) --

type FeedbackForwardingEmailAddress

string

param FeedbackForwardingEmailAddress

The address that you want bounce and complaint notifications to be sent to.

type FeedbackForwardingEmailAddressIdentityArn

string

param FeedbackForwardingEmailAddressIdentityArn

This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to use the email address specified in the FeedbackForwardingEmailAddress parameter.

For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) attaches a policy to it that authorizes you to use feedback@example.com, then you would specify the FeedbackForwardingEmailAddressIdentityArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the FeedbackForwardingEmailAddress to be feedback@example.com.

For more information about sending authorization, see the Amazon SES Developer Guide.

type Content

dict

param Content

[REQUIRED]

An object that contains the body of the message. You can send either a Simple message Raw message or a template Message.

  • 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 , or Shift_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 , or Shift_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 , or Shift_JIS .

  • 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 entire message must be Base64 encoded.

    • 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 entire message must be Base64 encoded.

      • 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 or SendBulkTemplatedEmail operations.

    • TemplateArn (string) --

      The Amazon Resource Name (ARN) of the template.

    • 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.

type EmailTags

list

param EmailTags

A list of tags, in the form of name/value pairs, to apply to an email that you send using the SendEmail operation. Tags correspond to characteristics of the email that you define, so that you can publish email sending events.

  • (dict) --

    Contains the name and value of a tag that you apply to an email. You can use message tags when you publish email sending events.

    • Name (string) -- [REQUIRED]

      The name of the message tag. The message tag name has to meet the following criteria:

      • It can only contain ASCII letters (a–z, A–Z), numbers (0–9), underscores (_), or dashes (-).

      • It can contain no more than 256 characters.

    • Value (string) -- [REQUIRED]

      The value of the message tag. The message tag value has to meet the following criteria:

      • It can only contain ASCII letters (a–z, A–Z), numbers (0–9), underscores (_), or dashes (-).

      • It can contain no more than 256 characters.

type ConfigurationSetName

string

param ConfigurationSetName

The name of the configuration set that you want to use when sending the email.

rtype

dict

returns

Response Syntax

{
    'MessageId': 'string'
}

Response Structure

  • (dict) --

    A unique message ID that you receive when an email is accepted for sending.

    • MessageId (string) --

      A unique identifier for the message that is generated when the message is accepted.

      Note

      It's possible for Amazon SES to accept a message without sending it. This can happen when the message that you're trying to send has an attachment contains a virus, or when you send a templated email that contains invalid personalization content, for example.