Amazon Simple Email Service

2016/03/15 - Amazon Simple Email Service - 2 new api methods

SetIdentityMailFromDomain (new) Link ¶

Enables or disables the custom MAIL FROM domain setup for a verified identity (email address or domain).

Warning

To send emails using the specified MAIL FROM domain, you must add an MX record to your MAIL FROM domain's DNS settings. If you want your emails to pass Sender Policy Framework (SPF) checks, you must also add or update an SPF record. For more information, see the Amazon SES Developer Guide.

This action is throttled at one request per second.

Request Syntax

client.set_identity_mail_from_domain(
    Identity='string',
    MailFromDomain='string',
    BehaviorOnMXFailure='UseDefaultValue'|'RejectMessage'
)
type Identity

string

param Identity

[REQUIRED]

The verified identity for which you want to enable or disable the specified custom MAIL FROM domain.

type MailFromDomain

string

param MailFromDomain

The custom MAIL FROM domain that you want the verified identity to use. The MAIL FROM domain must 1) be a subdomain of the verified identity, 2) not be used in a "From" address if the MAIL FROM domain is the destination of email feedback forwarding (for more information, see the Amazon SES Developer Guide ), and 3) not be used to receive emails. A value of null disables the custom MAIL FROM setting for the identity.

type BehaviorOnMXFailure

string

param BehaviorOnMXFailure

The action that you want Amazon SES to take if it cannot successfully read the required MX record when you send an email. If you choose UseDefaultValue , Amazon SES will use amazonses.com (or a subdomain of that) as the MAIL FROM domain. If you choose RejectMessage , Amazon SES will return a MailFromDomainNotVerified error and not send the email.

The action specified in BehaviorOnMXFailure is taken when the custom MAIL FROM domain setup is in the Pending , Failed , and TemporaryFailure states.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

GetIdentityMailFromDomainAttributes (new) Link ¶

Returns the custom MAIL FROM attributes for a list of identities (email addresses and/or domains).

This action is throttled at one request per second and can only get custom MAIL FROM attributes for up to 100 identities at a time.

Request Syntax

client.get_identity_mail_from_domain_attributes(
    Identities=[
        'string',
    ]
)
type Identities

list

param Identities

[REQUIRED]

A list of one or more identities.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'MailFromDomainAttributes': {
        'string': {
            'MailFromDomain': 'string',
            'MailFromDomainStatus': 'Pending'|'Success'|'Failed'|'TemporaryFailure',
            'BehaviorOnMXFailure': 'UseDefaultValue'|'RejectMessage'
        }
    }
}

Response Structure

  • (dict) --

    • MailFromDomainAttributes (dict) --

      A map of identities to custom MAIL FROM attributes.

      • (string) --

        • (dict) --

          Represents the custom MAIL FROM domain attributes of a verified identity (email address or domain).

          • MailFromDomain (string) --

            The custom MAIL FROM domain that the identity is configured to use.

          • MailFromDomainStatus (string) --

            The state that indicates whether Amazon SES has successfully read the MX record required for custom MAIL FROM domain setup. If the state is Success , Amazon SES uses the specified custom MAIL FROM domain when the verified identity sends an email. All other states indicate that Amazon SES takes the action described by BehaviorOnMXFailure .

          • BehaviorOnMXFailure (string) --

            The action that Amazon SES takes if it cannot successfully read the required MX record when you send an email. A value of UseDefaultValue indicates that if Amazon SES cannot read the required MX record, it uses amazonses.com (or a subdomain of that) as the MAIL FROM domain. A value of RejectMessage indicates that if Amazon SES cannot read the required MX record, Amazon SES returns a MailFromDomainNotVerified error and does not send the email.

            The custom MAIL FROM setup states that result in this behavior are Pending , Failed , and TemporaryFailure .