Amazon Simple Email Service

2024/12/11 - Amazon Simple Email Service - 4 new2 updated api methods

Changes  Introduces support for multi-region endpoint.

GetMultiRegionEndpoint (new) Link ¶

Displays the multi-region endpoint (global-endpoint) configuration.

Only multi-region endpoints (global-endpoints) whose primary region is the AWS-Region where operation is executed can be displayed.

See also: AWS API Documentation

Request Syntax

client.get_multi_region_endpoint(
    EndpointName='string'
)
type EndpointName:

string

param EndpointName:

[REQUIRED]

The name of the multi-region endpoint (global-endpoint).

rtype:

dict

returns:

Response Syntax

{
    'EndpointName': 'string',
    'EndpointId': 'string',
    'Routes': [
        {
            'Region': 'string'
        },
    ],
    'Status': 'CREATING'|'READY'|'FAILED'|'DELETING',
    'CreatedTimestamp': datetime(2015, 1, 1),
    'LastUpdatedTimestamp': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

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

    • EndpointName (string) --

      The name of the multi-region endpoint (global-endpoint).

    • EndpointId (string) --

      The ID of the multi-region endpoint (global-endpoint).

    • Routes (list) --

      Contains routes information for the multi-region endpoint (global-endpoint).

      • (dict) --

        An object which contains an AWS-Region and routing status.

        • Region (string) --

          The name of an AWS-Region.

    • Status (string) --

      The status of the multi-region endpoint (global-endpoint).

      • CREATING – The resource is being provisioned.

      • READY – The resource is ready to use.

      • FAILED – The resource failed to be provisioned.

      • DELETING – The resource is being deleted as requested.

    • CreatedTimestamp (datetime) --

      The time stamp of when the multi-region endpoint (global-endpoint) was created.

    • LastUpdatedTimestamp (datetime) --

      The time stamp of when the multi-region endpoint (global-endpoint) was last updated.

DeleteMultiRegionEndpoint (new) Link ¶

Deletes a multi-region endpoint (global-endpoint).

Only multi-region endpoints (global-endpoints) whose primary region is the AWS-Region where operation is executed can be deleted.

See also: AWS API Documentation

Request Syntax

client.delete_multi_region_endpoint(
    EndpointName='string'
)
type EndpointName:

string

param EndpointName:

[REQUIRED]

The name of the multi-region endpoint (global-endpoint) to be deleted.

rtype:

dict

returns:

Response Syntax

{
    'Status': 'CREATING'|'READY'|'FAILED'|'DELETING'
}

Response Structure

  • (dict) --

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

    • Status (string) --

      A status of the multi-region endpoint (global-endpoint) right after the delete request.

      • CREATING – The resource is being provisioned.

      • READY – The resource is ready to use.

      • FAILED – The resource failed to be provisioned.

      • DELETING – The resource is being deleted as requested.

CreateMultiRegionEndpoint (new) Link ¶

Creates a multi-region endpoint (global-endpoint).

The primary region is going to be the AWS-Region where the operation is executed. The secondary region has to be provided in request's parameters. From the data flow standpoint there is no difference between primary and secondary regions - sending traffic will be split equally between the two. The primary region is the region where the resource has been created and where it can be managed.

See also: AWS API Documentation

Request Syntax

client.create_multi_region_endpoint(
    EndpointName='string',
    Details={
        'RoutesDetails': [
            {
                'Region': 'string'
            },
        ]
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type EndpointName:

string

param EndpointName:

[REQUIRED]

The name of the multi-region endpoint (global-endpoint).

type Details:

dict

param Details:

[REQUIRED]

Contains details of a multi-region endpoint (global-endpoint) being created.

  • RoutesDetails (list) -- [REQUIRED]

    A list of route configuration details. Must contain exactly one route configuration.

    • (dict) --

      An object that contains route configuration. Includes secondary region name.

      • Region (string) -- [REQUIRED]

        The name of an AWS-Region to be a secondary region for the multi-region endpoint (global-endpoint).

type Tags:

list

param Tags:

An array of objects that define the tags (keys and values) to associate with the multi-region endpoint (global-endpoint).

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

rtype:

dict

returns:

Response Syntax

{
    'Status': 'CREATING'|'READY'|'FAILED'|'DELETING',
    'EndpointId': 'string'
}

Response Structure

  • (dict) --

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

    • Status (string) --

      A status of the multi-region endpoint (global-endpoint) right after the create request.

      • CREATING – The resource is being provisioned.

      • READY – The resource is ready to use.

      • FAILED – The resource failed to be provisioned.

      • DELETING – The resource is being deleted as requested.

    • EndpointId (string) --

      The ID of the multi-region endpoint (global-endpoint).

ListMultiRegionEndpoints (new) Link ¶

List the multi-region endpoints (global-endpoints).

Only multi-region endpoints (global-endpoints) whose primary region is the AWS-Region where operation is executed will be listed.

See also: AWS API Documentation

Request Syntax

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

string

param NextToken:

A token returned from a previous call to ListMultiRegionEndpoints to indicate the position in the list of multi-region endpoints (global-endpoints).

type PageSize:

integer

param PageSize:

The number of results to show in a single call to ListMultiRegionEndpoints. If the number of results is larger than the number you specified in this parameter, the response includes a NextToken element that you can use to retrieve the next page of results.

rtype:

dict

returns:

Response Syntax

{
    'MultiRegionEndpoints': [
        {
            'EndpointName': 'string',
            'Status': 'CREATING'|'READY'|'FAILED'|'DELETING',
            'EndpointId': 'string',
            'Regions': [
                'string',
            ],
            'CreatedTimestamp': datetime(2015, 1, 1),
            'LastUpdatedTimestamp': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    The following elements are returned by the service.

    • MultiRegionEndpoints (list) --

      An array that contains key multi-region endpoint (global-endpoint) properties.

      • (dict) --

        An object that contains multi-region endpoint (global-endpoint) properties.

        • EndpointName (string) --

          The name of the multi-region endpoint (global-endpoint).

        • Status (string) --

          The status of the multi-region endpoint (global-endpoint).

          • CREATING – The resource is being provisioned.

          • READY – The resource is ready to use.

          • FAILED – The resource failed to be provisioned.

          • DELETING – The resource is being deleted as requested.

        • EndpointId (string) --

          The ID of the multi-region endpoint (global-endpoint).

        • Regions (list) --

          Primary and secondary regions between which multi-region endpoint splits sending traffic.

          • (string) --

            The name of an AWS-Region.

        • CreatedTimestamp (datetime) --

          The time stamp of when the multi-region endpoint (global-endpoint) was created.

        • LastUpdatedTimestamp (datetime) --

          The time stamp of when the multi-region endpoint (global-endpoint) was last updated.

    • NextToken (string) --

      A token indicating that there are additional multi-region endpoints (global-endpoints) available to be listed. Pass this token to a subsequent ListMultiRegionEndpoints call to retrieve the next page.

SendBulkEmail (updated) Link ¶
Changes (request)
{'EndpointId': 'string'}

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',
            'TemplateContent': {
                'Subject': 'string',
                'Text': 'string',
                'Html': 'string'
            },
            'TemplateData': 'string',
            'Headers': [
                {
                    'Name': 'string',
                    'Value': 'string'
                },
            ]
        }
    },
    BulkEmailEntries=[
        {
            'Destination': {
                'ToAddresses': [
                    'string',
                ],
                'CcAddresses': [
                    'string',
                ],
                'BccAddresses': [
                    'string',
                ]
            },
            'ReplacementTags': [
                {
                    'Name': 'string',
                    'Value': 'string'
                },
            ],
            'ReplacementEmailContent': {
                'ReplacementTemplate': {
                    'ReplacementTemplateData': 'string'
                }
            },
            'ReplacementHeaders': [
                {
                    'Name': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    ConfigurationSetName='string',
    EndpointId='string'
)
type FromEmailAddress:

string

param FromEmailAddress:

The email address 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.

    • TemplateContent (dict) --

      The content of the template.

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

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.

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

    • ReplacementHeaders (list) --

      The list of message headers associated with the BulkEmailEntry data type.

      • Headers Not Present in BulkEmailEntry: If a header is specified in Template but not in BulkEmailEntry, the header from Template will be added to the outgoing email.

      • Headers Present in BulkEmailEntry: If a header is specified in BulkEmailEntry, it takes precedence over any header of the same name specified in Template:

        • If the header is also defined within Template, the value from BulkEmailEntry will replace the header's value in the email.

        • If the header is not defined within Template, it will simply be added to the email as specified in BulkEmailEntry.

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

type ConfigurationSetName:

string

param ConfigurationSetName:

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

type EndpointId:

string

param EndpointId:

The ID of the multi-region endpoint (global-endpoint).

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

      One object per intended recipient. Check each response object and retry any messages with a failure status.

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

SendEmail (updated) Link ¶
Changes (request)
{'EndpointId': 'string'}

Sends an email message. You can use the Amazon SES API v2 to send the following 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'
                }
            },
            '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'
                },
            ]
        }
    },
    EmailTags=[
        {
            'Name': 'string',
            'Value': 'string'
        },
    ],
    ConfigurationSetName='string',
    EndpointId='string',
    ListManagementOptions={
        'ContactListName': 'string',
        'TopicName': 'string'
    }
)
type FromEmailAddress:

string

param FromEmailAddress:

The email address 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 Templated 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.

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

    • TemplateArn (string) --

      The Amazon Resource Name (ARN) of the template.

    • TemplateContent (dict) --

      The content of the template.

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

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 to use when sending the email.

type EndpointId:

string

param EndpointId:

The ID of the multi-region endpoint (global-endpoint).

type ListManagementOptions:

dict

param ListManagementOptions:

An object used to specify a list or topic to which an email belongs, which will be used when a contact chooses to unsubscribe.

  • ContactListName (string) -- [REQUIRED]

    The name of the contact list.

  • TopicName (string) --

    The name of the topic.

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.