

.. _RFC 2047: http://tools.ietf.org/html/rfc2047
.. _Amazon SES Developer Guide: http://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim-dns-records.html


***
SES
***

.. contents:: Table of Contents
   :depth: 2


======
Client
======



.. py:class:: SES.Client

  A low-level client representing Amazon Simple Email Service (SES)::

    
    import boto3
    
    client = boto3.client('ses')

  
  These are the available methods:
  
  *   :py:meth:`can_paginate`

  
  *   :py:meth:`delete_identity`

  
  *   :py:meth:`delete_identity_policy`

  
  *   :py:meth:`delete_verified_email_address`

  
  *   :py:meth:`generate_presigned_url`

  
  *   :py:meth:`get_identity_dkim_attributes`

  
  *   :py:meth:`get_identity_notification_attributes`

  
  *   :py:meth:`get_identity_policies`

  
  *   :py:meth:`get_identity_verification_attributes`

  
  *   :py:meth:`get_paginator`

  
  *   :py:meth:`get_send_quota`

  
  *   :py:meth:`get_send_statistics`

  
  *   :py:meth:`get_waiter`

  
  *   :py:meth:`list_identities`

  
  *   :py:meth:`list_identity_policies`

  
  *   :py:meth:`list_verified_email_addresses`

  
  *   :py:meth:`put_identity_policy`

  
  *   :py:meth:`send_email`

  
  *   :py:meth:`send_raw_email`

  
  *   :py:meth:`set_identity_dkim_enabled`

  
  *   :py:meth:`set_identity_feedback_forwarding_enabled`

  
  *   :py:meth:`set_identity_notification_topic`

  
  *   :py:meth:`verify_domain_dkim`

  
  *   :py:meth:`verify_domain_identity`

  
  *   :py:meth:`verify_email_address`

  
  *   :py:meth:`verify_email_identity`

  

  .. py:method:: can_paginate(operation_name)

        
    Check if an operation can be paginated.
    
    :type operation_name: string
    :param operation_name: The operation name.  This is the same name
        as the method name on the client.  For example, if the
        method name is ``create_foo``, and you'd normally invoke the
        operation as ``client.create_foo(**kwargs)``, if the
        ``create_foo`` operation can be paginated, you can use the
        call ``client.get_paginator("create_foo")``.
    
    :return: ``True`` if the operation can be paginated,
        ``False`` otherwise.


  .. py:method:: delete_identity(**kwargs)

    

    Deletes the specified identity (email address or domain) from the list of verified identities.

     

    This action is throttled at one request per second.

    

    **Request Syntax** 
    ::

      response = client.delete_identity(
          Identity='string'
      )
    :type Identity: string
    :param Identity: **[REQUIRED]** 

      The identity to be removed from the list of identities for the AWS Account.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {}
        
      **Response Structure** 

      

      - *(dict) --* 

        An empty element. Receiving this element indicates that the request completed successfully.

        
    

  .. py:method:: delete_identity_policy(**kwargs)

    

    Deletes the specified sending authorization policy for the given identity (email address or 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`_ .

     

    This action is throttled at one request per second.

    

    **Request Syntax** 
    ::

      response = client.delete_identity_policy(
          Identity='string',
          PolicyName='string'
      )
    :type Identity: string
    :param Identity: **[REQUIRED]** 

      The identity that is associated with the policy that you want to delete. You can specify the identity by using its name or by using its Amazon Resource Name (ARN). Examples: ``user@example.com`` , ``example.com`` , ``arn:aws:ses:us-east-1:123456789012:identity/example.com`` .

       

      To successfully call this API, you must own the identity.

      

    
    :type PolicyName: string
    :param PolicyName: **[REQUIRED]** 

      The name of the policy to be deleted.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {}
        
      **Response Structure** 

      

      - *(dict) --* 

        An empty element. Receiving this element indicates that the request completed successfully.

        
    

  .. py:method:: delete_verified_email_address(**kwargs)

    

    Deletes the specified email address from the list of verified addresses.

     

    .. warning::

      The DeleteVerifiedEmailAddress action is deprecated as of the May 15, 2012 release of Domain Verification. The DeleteIdentity action is now preferred.

     

    This action is throttled at one request per second.

    

    **Request Syntax** 
    ::

      response = client.delete_verified_email_address(
          EmailAddress='string'
      )
    :type EmailAddress: string
    :param EmailAddress: **[REQUIRED]** 

      An email address to be removed from the list of verified addresses.

      

    
    
    :returns: None

  .. py:method:: generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)

        
    Generate a presigned url given a client, its method, and arguments
    
    :type ClientMethod: string
    :param ClientMethod: The client method to presign for
    
    :type Params: dict
    :param Params: The parameters normally passed to
        ``ClientMethod``.
    
    :type ExpiresIn: int
    :param ExpiresIn: The number of seconds the presigned url is valid
        for. By default it expires in an hour (3600 seconds)
    
    :type HttpMethod: string
    :param HttpMethod: The http method to use on the generated url. By
        default, the http method is whatever is used in the method's model.
    
    :returns: The presigned url


  .. py:method:: get_identity_dkim_attributes(**kwargs)

    

    Returns the current status of Easy DKIM signing for an entity. For domain name identities, this action also returns the DKIM tokens that are required for Easy DKIM signing, and whether Amazon SES has successfully verified that these tokens have been published.

     

    This action takes a list of identities as input and returns the following information for each:

     

     
    * Whether Easy DKIM signing is enabled or disabled.
     
    * A set of DKIM tokens that represent the identity. If the identity is an email address, the tokens represent the domain of that address.
     
    * Whether Amazon SES has successfully verified the DKIM tokens published in the domain's DNS. This information is only returned for domain name identities, not for email addresses.
     

     

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

     

    For more information about creating DNS records using DKIM tokens, go to the `Amazon SES Developer Guide`_ .

    

    **Request Syntax** 
    ::

      response = client.get_identity_dkim_attributes(
          Identities=[
              'string',
          ]
      )
    :type Identities: list
    :param Identities: **[REQUIRED]** 

      A list of one or more verified identities - email addresses, domains, or both.

      

    
      - *(string) --* 

      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'DkimAttributes': {
                'string': {
                    'DkimEnabled': True|False,
                    'DkimVerificationStatus': 'Pending'|'Success'|'Failed'|'TemporaryFailure'|'NotStarted',
                    'DkimTokens': [
                        'string',
                    ]
                }
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Represents a list of all the DKIM attributes for the specified identity.

        
        

        - **DkimAttributes** *(dict) --* 

          The DKIM attributes for an email address or a domain. 

          
          

          - *(string) --* 
            

            - *(dict) --* 

              Represents the DKIM attributes of a verified email address or a domain.

              
              

              - **DkimEnabled** *(boolean) --* 

                True if DKIM signing is enabled for email sent from the identity; false otherwise.

                
              

              - **DkimVerificationStatus** *(string) --* 

                Describes whether Amazon SES has successfully verified the DKIM DNS records (tokens) published in the domain name's DNS. (This only applies to domain identities, not email address identities.)

                
              

              - **DkimTokens** *(list) --* 

                A set of character strings that represent the domain's identity. Using these tokens, you will need to create DNS CNAME records that point to DKIM public keys hosted by Amazon SES. Amazon Web Services will eventually detect that you have updated your DNS records; this detection process may take up to 72 hours. Upon successful detection, Amazon SES will be able to DKIM-sign email originating from that domain. (This only applies to domain identities, not email address identities.)

                 

                For more information about creating DNS records using DKIM tokens, go to the `Amazon SES Developer Guide`_ .

                
                

                - *(string) --* 
            
          
      
    
    

  .. py:method:: get_identity_notification_attributes(**kwargs)

    

    Given a list of verified identities (email addresses and/or domains), returns a structure describing identity notification attributes.

     

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

     

    For more information about using notifications with Amazon SES, see the `Amazon SES Developer Guide`_ .

    

    **Request Syntax** 
    ::

      response = client.get_identity_notification_attributes(
          Identities=[
              'string',
          ]
      )
    :type Identities: list
    :param Identities: **[REQUIRED]** 

      A list of one or more identities. You can specify an identity by using its name or by using its Amazon Resource Name (ARN). Examples: ``user@example.com`` , ``example.com`` , ``arn:aws:ses:us-east-1:123456789012:identity/example.com`` .

      

    
      - *(string) --* 

      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'NotificationAttributes': {
                'string': {
                    'BounceTopic': 'string',
                    'ComplaintTopic': 'string',
                    'DeliveryTopic': 'string',
                    'ForwardingEnabled': True|False
                }
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Describes whether an identity has Amazon Simple Notification Service (Amazon SNS) topics set for bounce, complaint, and/or delivery notifications, and specifies whether feedback forwarding is enabled for bounce and complaint notifications.

        
        

        - **NotificationAttributes** *(dict) --* 

          A map of Identity to IdentityNotificationAttributes.

          
          

          - *(string) --* 
            

            - *(dict) --* 

              Represents the notification attributes of an identity, including whether an identity has Amazon Simple Notification Service (Amazon SNS) topics set for bounce, complaint, and/or delivery notifications, and whether feedback forwarding is enabled for bounce and complaint notifications.

              
              

              - **BounceTopic** *(string) --* 

                The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES will publish bounce notifications.

                
              

              - **ComplaintTopic** *(string) --* 

                The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES will publish complaint notifications.

                
              

              - **DeliveryTopic** *(string) --* 

                The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES will publish delivery notifications.

                
              

              - **ForwardingEnabled** *(boolean) --* 

                Describes whether Amazon SES will forward bounce and complaint notifications as email. ``true`` indicates that Amazon SES will forward bounce and complaint notifications as email, while ``false`` indicates that bounce and complaint notifications will be published only to the specified bounce and complaint Amazon SNS topics.

                
          
      
    
    

  .. py:method:: get_identity_policies(**kwargs)

    

    Returns the requested sending authorization policies for the given identity (email address or 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`_ .

     

    This action is throttled at one request per second.

    

    **Request Syntax** 
    ::

      response = client.get_identity_policies(
          Identity='string',
          PolicyNames=[
              'string',
          ]
      )
    :type Identity: string
    :param Identity: **[REQUIRED]** 

      The identity for which the policies will be retrieved. You can specify an identity by using its name or by using its Amazon Resource Name (ARN). Examples: ``user@example.com`` , ``example.com`` , ``arn:aws:ses:us-east-1:123456789012:identity/example.com`` .

       

      To successfully call this API, you must own the identity.

      

    
    :type PolicyNames: list
    :param PolicyNames: **[REQUIRED]** 

      A list of the names of policies to be retrieved. You can retrieve a maximum of 20 policies at a time. If you do not know the names of the policies that are attached to the identity, you can use ``ListIdentityPolicies`` .

      

    
      - *(string) --* name of the policy.

      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Policies': {
                'string': 'string'
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Represents a map of policy names to policies returned from a successful ``GetIdentityPolicies`` request. 

        
        

        - **Policies** *(dict) --* 

          A map of policy names to policies.

          
          

          - *(string) --* name of the policy.
            

            - *(string) --* JSON representation of a valid policy.
      
    
    

  .. py:method:: get_identity_verification_attributes(**kwargs)

    

    Given a list of identities (email addresses and/or domains), returns the verification status and (for domain identities) the verification token for each identity.

     

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

    

    **Request Syntax** 
    ::

      response = client.get_identity_verification_attributes(
          Identities=[
              'string',
          ]
      )
    :type Identities: list
    :param Identities: **[REQUIRED]** 

      A list of identities.

      

    
      - *(string) --* 

      
  
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'VerificationAttributes': {
                'string': {
                    'VerificationStatus': 'Pending'|'Success'|'Failed'|'TemporaryFailure'|'NotStarted',
                    'VerificationToken': 'string'
                }
            }
        }
      **Response Structure** 

      

      - *(dict) --* 

        Represents the verification attributes for a list of identities.

        
        

        - **VerificationAttributes** *(dict) --* 

          A map of Identities to IdentityVerificationAttributes objects.

          
          

          - *(string) --* 
            

            - *(dict) --* 

              Represents the verification attributes of a single identity.

              
              

              - **VerificationStatus** *(string) --* 

                The verification status of the identity: "Pending", "Success", "Failed", or "TemporaryFailure".

                
              

              - **VerificationToken** *(string) --* 

                The verification token for a domain identity. Null for email address identities.

                
          
      
    
    

  .. py:method:: get_paginator(operation_name)

        
    Create a paginator for an operation.
    
    :type operation_name: string
    :param operation_name: The operation name.  This is the same name
        as the method name on the client.  For example, if the
        method name is ``create_foo``, and you'd normally invoke the
        operation as ``client.create_foo(**kwargs)``, if the
        ``create_foo`` operation can be paginated, you can use the
        call ``client.get_paginator("create_foo")``.
    
    :raise OperationNotPageableError: Raised if the operation is not
        pageable.  You can use the ``client.can_paginate`` method to
        check if an operation is pageable.
    
    :rtype: L{botocore.paginate.Paginator}
    :return: A paginator object.


  .. py:method:: get_send_quota()

    

    Returns the user's current sending limits.

     

    This action is throttled at one request per second.

    

    **Request Syntax** 

    ::

      response = client.get_send_quota()
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Max24HourSend': 123.0,
            'MaxSendRate': 123.0,
            'SentLast24Hours': 123.0
        }
      **Response Structure** 

      

      - *(dict) --* 

        Represents the user's current activity limits returned from a successful ``GetSendQuota`` request. 

        
        

        - **Max24HourSend** *(float) --* 

          The maximum number of emails the user is allowed to send in a 24-hour interval. A value of -1 signifies an unlimited quota.

          
        

        - **MaxSendRate** *(float) --* 

          The maximum number of emails that Amazon SES can accept from the user's account per second.

           

          .. note::

            The rate at which Amazon SES accepts the user's messages might be less than the maximum send rate.

          
        

        - **SentLast24Hours** *(float) --* 

          The number of emails sent during the previous 24 hours.

          
    

  .. py:method:: get_send_statistics()

    

    Returns the user's sending statistics. The result is a list of data points, representing the last two weeks of sending activity. 

     

    Each data point in the list contains statistics for a 15-minute interval.

     

    This action is throttled at one request per second.

    

    **Request Syntax** 

    ::

      response = client.get_send_statistics()
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'SendDataPoints': [
                {
                    'Timestamp': datetime(2015, 1, 1),
                    'DeliveryAttempts': 123,
                    'Bounces': 123,
                    'Complaints': 123,
                    'Rejects': 123
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Represents a list of ``SendDataPoint`` items returned from a successful ``GetSendStatistics`` request. This list contains aggregated data from the previous two weeks of sending activity. 

        
        

        - **SendDataPoints** *(list) --* 

          A list of data points, each of which represents 15 minutes of activity.

          
          

          - *(dict) --* 

            Represents sending statistics data. Each ``SendDataPoint`` contains statistics for a 15-minute period of sending activity. 

            
            

            - **Timestamp** *(datetime) --* 

              Time of the data point.

              
            

            - **DeliveryAttempts** *(integer) --* 

              Number of emails that have been enqueued for sending.

              
            

            - **Bounces** *(integer) --* 

              Number of emails that have bounced.

              
            

            - **Complaints** *(integer) --* 

              Number of unwanted emails that were rejected by recipients.

              
            

            - **Rejects** *(integer) --* 

              Number of emails rejected by Amazon SES.

              
        
      
    

  .. py:method:: get_waiter(waiter_name)

        


  .. py:method:: list_identities(**kwargs)

    

    Returns a list containing all of the identities (email addresses and domains) for a specific AWS Account, regardless of verification status.

     

    This action is throttled at one request per second.

    

    **Request Syntax** 
    ::

      response = client.list_identities(
          IdentityType='EmailAddress'|'Domain',
          NextToken='string',
          MaxItems=123
      )
    :type IdentityType: string
    :param IdentityType: 

      The type of the identities to list. Possible values are "EmailAddress" and "Domain". If this parameter is omitted, then all identities will be listed.

      

    
    :type NextToken: string
    :param NextToken: 

      The token to use for pagination.

      

    
    :type MaxItems: integer
    :param MaxItems: 

      The maximum number of identities per page. Possible values are 1-1000 inclusive.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Identities': [
                'string',
            ],
            'NextToken': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Represents a list of all verified identities for the AWS Account.

        
        

        - **Identities** *(list) --* 

          A list of identities.

          
          

          - *(string) --* 
      
        

        - **NextToken** *(string) --* 

          The token used for pagination.

          
    

  .. py:method:: list_identity_policies(**kwargs)

    

    Returns a list of sending authorization policies that are attached to the given identity (email address or domain). This API returns only a list. If you want the actual policy content, you can use ``GetIdentityPolicies`` .

     

    .. 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`_ .

     

    This action is throttled at one request per second.

    

    **Request Syntax** 
    ::

      response = client.list_identity_policies(
          Identity='string'
      )
    :type Identity: string
    :param Identity: **[REQUIRED]** 

      The identity that is associated with the policy for which the policies will be listed. You can specify an identity by using its name or by using its Amazon Resource Name (ARN). Examples: ``user@example.com`` , ``example.com`` , ``arn:aws:ses:us-east-1:123456789012:identity/example.com`` .

       

      To successfully call this API, you must own the identity.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'PolicyNames': [
                'string',
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Represents a list of policy names returned from a successful ``ListIdentityPolicies`` request. 

        
        

        - **PolicyNames** *(list) --* 

          A list of names of policies that apply to the specified identity.

          
          

          - *(string) --* name of the policy.
      
    

  .. py:method:: list_verified_email_addresses()

    

    Returns a list containing all of the email addresses that have been verified.

     

    .. warning::

      The ListVerifiedEmailAddresses action is deprecated as of the May 15, 2012 release of Domain Verification. The ListIdentities action is now preferred.

     

    This action is throttled at one request per second.

    

    **Request Syntax** 

    ::

      response = client.list_verified_email_addresses()
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'VerifiedEmailAddresses': [
                'string',
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Represents a list of all the email addresses verified for the current user.

        
        

        - **VerifiedEmailAddresses** *(list) --* 

          A list of email addresses that have been verified.

          
          

          - *(string) --* 
      
    

  .. py:method:: put_identity_policy(**kwargs)

    

    Adds or updates a sending authorization policy for the specified identity (email address or 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`_ .

     

    This action is throttled at one request per second.

    

    **Request Syntax** 
    ::

      response = client.put_identity_policy(
          Identity='string',
          PolicyName='string',
          Policy='string'
      )
    :type Identity: string
    :param Identity: **[REQUIRED]** 

      The identity to which the policy will apply. You can specify an identity by using its name or by using its Amazon Resource Name (ARN). Examples: ``user@example.com`` , ``example.com`` , ``arn:aws:ses:us-east-1:123456789012:identity/example.com`` .

       

      To successfully call this API, you must own the identity.

      

    
    :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 empty element. Receiving this element indicates that the request completed successfully.

        
    

  .. py:method:: send_email(**kwargs)

    

    Composes an email message based on input data, and then immediately queues the message for sending. 

     

    There are several important points to know about ``SendEmail`` :

     

     
    * You can only send email from verified email addresses and domains; otherwise, you will get an "Email address not verified" error. If your account is still in the Amazon SES sandbox, you must also verify every recipient email address except for the recipients provided by the Amazon SES mailbox simulator. For more information, go to the `Amazon SES Developer Guide`_ .
     
    * The total size of the message cannot exceed 10 MB. This includes any attachments that are part of the message.
     
    * Amazon SES has a limit on the total number of recipients per message. The combined number of To:, CC: and BCC: email addresses cannot exceed 50. If you need to send an email message to a larger audience, you can divide your recipient list into groups of 50 or fewer, and then call Amazon SES repeatedly to send the message to each group.
     
    * For every message that you send, the total number of recipients (To:, CC: and BCC:) is counted against your sending quota - the maximum number of emails you can send in a 24-hour period. For information about your sending quota, go to the `Amazon SES Developer Guide`_ .
     

    

    **Request Syntax** 
    ::

      response = client.send_email(
          Source='string',
          Destination={
              'ToAddresses': [
                  'string',
              ],
              'CcAddresses': [
                  'string',
              ],
              'BccAddresses': [
                  'string',
              ]
          },
          Message={
              'Subject': {
                  'Data': 'string',
                  'Charset': 'string'
              },
              'Body': {
                  'Text': {
                      'Data': 'string',
                      'Charset': 'string'
                  },
                  'Html': {
                      'Data': 'string',
                      'Charset': 'string'
                  }
              }
          },
          ReplyToAddresses=[
              'string',
          ],
          ReturnPath='string',
          SourceArn='string',
          ReturnPathArn='string'
      )
    :type Source: string
    :param Source: **[REQUIRED]** 

      The email address that is sending the email. This email address must be either individually verified with Amazon SES, or from a domain that has been verified with Amazon SES. For information about verifying identities, see the `Amazon SES Developer Guide`_ .

       

      If you are sending on behalf of another user and have been permitted to do so by a sending authorization policy, then you must also specify the ``SourceArn`` parameter. For more information about sending authorization, see the `Amazon SES Developer Guide`_ .

       

      In all cases, the email address must be 7-bit ASCII. If the text must contain any other characters, then you must use MIME encoded-word syntax (RFC 2047) instead of a literal string. MIME encoded-word syntax uses the following form: ``=?charset?encoding?encoded-text?=`` . For more information, see `RFC 2047`_ . 

      

    
    :type Destination: dict
    :param Destination: **[REQUIRED]** 

      The destination for this email, composed of To:, CC:, and BCC: fields.

      

    
      - **ToAddresses** *(list) --* 

        The To: field(s) of the message.

        

      
        - *(string) --* 

        
    
      - **CcAddresses** *(list) --* 

        The CC: field(s) of the message.

        

      
        - *(string) --* 

        
    
      - **BccAddresses** *(list) --* 

        The BCC: field(s) of the message.

        

      
        - *(string) --* 

        
    
    
    :type Message: dict
    :param Message: **[REQUIRED]** 

      The message to be sent.

      

    
      - **Subject** *(dict) --* **[REQUIRED]** 

        The subject of the message: A short summary of the content, which will appear in the recipient's inbox.

        

      
        - **Data** *(string) --* **[REQUIRED]** 

          The textual data of the content.

          

        
        - **Charset** *(string) --* 

          The character set of the content.

          

        
      
      - **Body** *(dict) --* **[REQUIRED]** 

        The message body.

        

      
        - **Text** *(dict) --* 

          The content of the message, in text format. Use this for text-based email clients, or clients on high-latency networks (such as mobile devices). 

          

        
          - **Data** *(string) --* **[REQUIRED]** 

            The textual data of the content.

            

          
          - **Charset** *(string) --* 

            The character set of the content.

            

          
        
        - **Html** *(dict) --* 

          The content of the message, in HTML format. Use this for email clients that can process HTML. You can include clickable links, formatted text, and much more in an HTML message. 

          

        
          - **Data** *(string) --* **[REQUIRED]** 

            The textual data of the content.

            

          
          - **Charset** *(string) --* 

            The character set of the content.

            

          
        
      
    
    :type ReplyToAddresses: list
    :param ReplyToAddresses: 

      The reply-to email address(es) for the message. If the recipient replies to the message, each reply-to address will receive the reply. 

      

    
      - *(string) --* 

      
  
    :type ReturnPath: string
    :param ReturnPath: 

      The email address to which bounces and complaints are to be forwarded when feedback forwarding is enabled. If the message cannot be delivered to the recipient, then an error message will be returned from the recipient's ISP; this message will then be forwarded to the email address specified by the ``ReturnPath`` parameter. The ``ReturnPath`` parameter is never overwritten. This email address must be either individually verified with Amazon SES, or from a domain that has been verified with Amazon SES. 

      

    
    :type SourceArn: string
    :param SourceArn: 

      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 send for the email address specified in the ``Source`` 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 send from ``user@example.com`` , then you would specify the ``SourceArn`` to be ``arn:aws:ses:us-east-1:123456789012:identity/example.com`` , and the ``Source`` to be ``user@example.com`` .

       

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

      

    
    :type ReturnPathArn: string
    :param ReturnPathArn: 

      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 ``ReturnPath`` 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 ``ReturnPathArn`` to be ``arn:aws:ses:us-east-1:123456789012:identity/example.com`` , and the ``ReturnPath`` to be ``feedback@example.com`` .

       

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

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'MessageId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Represents a unique message ID returned from a successful ``SendEmail`` request. 

        
        

        - **MessageId** *(string) --* 

          The unique message identifier returned from the ``SendEmail`` action. 

          
    

  .. py:method:: send_raw_email(**kwargs)

    

    Sends an email message, with header and content specified by the client. The ``SendRawEmail`` action is useful for sending multipart MIME emails. The raw text of the message must comply with Internet email standards; otherwise, the message cannot be sent. 

     

    There are several important points to know about ``SendRawEmail`` :

     

     
    * You can only send email from verified email addresses and domains; otherwise, you will get an "Email address not verified" error. If your account is still in the Amazon SES sandbox, you must also verify every recipient email address except for the recipients provided by the Amazon SES mailbox simulator. For more information, go to the `Amazon SES Developer Guide`_ .
     
    * The total size of the message cannot exceed 10 MB. This includes any attachments that are part of the message.
     
    * Amazon SES has a limit on the total number of recipients per message. The combined number of To:, CC: and BCC: email addresses cannot exceed 50. If you need to send an email message to a larger audience, you can divide your recipient list into groups of 50 or fewer, and then call Amazon SES repeatedly to send the message to each group.
     
    * The To:, CC:, and BCC: headers in the raw message can contain a group list. Note that each recipient in a group list counts towards the 50-recipient limit.
     
    * For every message that you send, the total number of recipients (To:, CC: and BCC:) is counted against your sending quota - the maximum number of emails you can send in a 24-hour period. For information about your sending quota, go to the `Amazon SES Developer Guide`_ .
     
    * If you are using sending authorization to send on behalf of another user, ``SendRawEmail`` enables you to specify the cross-account identity for the email's "Source," "From," and "Return-Path" parameters in one of two ways: you can pass optional parameters ``SourceArn`` , ``FromArn`` , and/or ``ReturnPathArn`` to the API, or you can include the following X-headers in the header of your raw email:  * ``X-SES-SOURCE-ARN`` 
     
    * ``X-SES-FROM-ARN`` 
     
    * ``X-SES-RETURN-PATH-ARN`` 
     

     

    .. warning::

      Do not include these X-headers in the DKIM signature, because they are removed by Amazon SES before sending the email.

    For the most common sending authorization use case, we recommend that you specify the ``SourceIdentityArn`` and do not specify either the ``FromIdentityArn`` or ``ReturnPathIdentityArn`` . (The same note applies to the corresponding X-headers.) If you only specify the ``SourceIdentityArn`` , Amazon SES will simply set the "From" address and the "Return Path" address to the identity specified in ``SourceIdentityArn`` . For more information about sending authorization, see the `Amazon SES Developer Guide`_ .
     

    

    **Request Syntax** 
    ::

      response = client.send_raw_email(
          Source='string',
          Destinations=[
              'string',
          ],
          RawMessage={
              'Data': b'bytes'
          },
          FromArn='string',
          SourceArn='string',
          ReturnPathArn='string'
      )
    :type Source: string
    :param Source: 

      The identity's email address. If you do not provide a value for this parameter, you must specify a "From" address in the raw text of the message. (You can also specify both.)

       

      By default, the string must be 7-bit ASCII. If the text must contain any other characters, then you must use MIME encoded-word syntax (RFC 2047) instead of a literal string. MIME encoded-word syntax uses the following form: ``=?charset?encoding?encoded-text?=`` . For more information, see `RFC 2047`_ . 

       

      .. note::

        If you specify the ``Source`` parameter and have feedback forwarding enabled, then bounces and complaints will be sent to this email address. This takes precedence over any *Return-Path* header that you might include in the raw text of the message. 

      

    
    :type Destinations: list
    :param Destinations: 

      A list of destinations for the message, consisting of To:, CC:, and BCC: addresses.

      

    
      - *(string) --* 

      
  
    :type RawMessage: dict
    :param RawMessage: **[REQUIRED]** 

      The raw text of the message. The client is responsible for ensuring the following:

       

       

       
      * Message must contain a header and a body, separated by a blank line.
       
      * All required header fields must be present.
       
      * Each part of a multipart MIME message must be formatted properly.
       
      * MIME content types must be among those supported by Amazon SES. For more information, go to the `Amazon SES Developer Guide`_ . 
       
      * Content must be base64-encoded, if MIME requires it.
       

       

      

    
      - **Data** *(bytes) --* **[REQUIRED]** 

        The raw data of the message. The client must ensure that the message format complies with Internet email standards regarding email header fields, MIME types, MIME encoding, and base64 encoding (if necessary). 

         

        The To:, CC:, and BCC: headers in the raw message can contain a group list. 

         

        If you are using ``SendRawEmail`` with sending authorization, you can include X-headers in the raw message to specify the "Source," "From," and "Return-Path" addresses. For more information, see the documentation for ``SendRawEmail`` . 

         

        .. warning::

          Do not include these X-headers in the DKIM signature, because they are removed by Amazon SES before sending the email.

         

        For more information, go to the `Amazon SES Developer Guide`_ . 

        

      
    
    :type FromArn: string
    :param FromArn: 

      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 specify a particular "From" address in the header of the raw email.

       

      Instead of using this parameter, you can use the X-header ``X-SES-FROM-ARN`` in the raw message of the email. If you use both the ``FromArn`` parameter and the corresponding X-header, Amazon SES uses the value of the ``FromArn`` parameter.

       

      .. note::

        For information about when to use this parameter, see the description of ``SendRawEmail`` in this guide, or see the `Amazon SES Developer Guide`_ . 

      

    
    :type SourceArn: string
    :param SourceArn: 

      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 send for the email address specified in the ``Source`` 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 send from ``user@example.com`` , then you would specify the ``SourceArn`` to be ``arn:aws:ses:us-east-1:123456789012:identity/example.com`` , and the ``Source`` to be ``user@example.com`` .

       

      Instead of using this parameter, you can use the X-header ``X-SES-SOURCE-ARN`` in the raw message of the email. If you use both the ``SourceArn`` parameter and the corresponding X-header, Amazon SES uses the value of the ``SourceArn`` parameter.

       

      .. note::

        For information about when to use this parameter, see the description of ``SendRawEmail`` in this guide, or see the `Amazon SES Developer Guide`_ . 

      

    
    :type ReturnPathArn: string
    :param ReturnPathArn: 

      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 ``ReturnPath`` 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 ``ReturnPathArn`` to be ``arn:aws:ses:us-east-1:123456789012:identity/example.com`` , and the ``ReturnPath`` to be ``feedback@example.com`` .

       

      Instead of using this parameter, you can use the X-header ``X-SES-RETURN-PATH-ARN`` in the raw message of the email. If you use both the ``ReturnPathArn`` parameter and the corresponding X-header, Amazon SES uses the value of the ``ReturnPathArn`` parameter.

       

      .. note::

        For information about when to use this parameter, see the description of ``SendRawEmail`` in this guide, or see the `Amazon SES Developer Guide`_ . 

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'MessageId': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Represents a unique message ID returned from a successful ``SendRawEmail`` request. 

        
        

        - **MessageId** *(string) --* 

          The unique message identifier returned from the ``SendRawEmail`` action. 

          
    

  .. py:method:: set_identity_dkim_enabled(**kwargs)

    

    Enables or disables Easy DKIM signing of email sent from an identity:

     

     
    * If Easy DKIM signing is enabled for a domain name identity (e.g., ``example.com`` ), then Amazon SES will DKIM-sign all email sent by addresses under that domain name (e.g., ``user@example.com`` ).
     
    * If Easy DKIM signing is enabled for an email address, then Amazon SES will DKIM-sign all email sent by that email address.
     

     

    For email addresses (e.g., ``user@example.com`` ), you can only enable Easy DKIM signing if the corresponding domain (e.g., ``example.com`` ) has been set up for Easy DKIM using the AWS Console or the ``VerifyDomainDkim`` action.

     

    This action is throttled at one request per second.

     

    For more information about Easy DKIM signing, go to the `Amazon SES Developer Guide`_ .

    

    **Request Syntax** 
    ::

      response = client.set_identity_dkim_enabled(
          Identity='string',
          DkimEnabled=True|False
      )
    :type Identity: string
    :param Identity: **[REQUIRED]** 

      The identity for which DKIM signing should be enabled or disabled.

      

    
    :type DkimEnabled: boolean
    :param DkimEnabled: **[REQUIRED]** 

      Sets whether DKIM signing is enabled for an identity. Set to ``true`` to enable DKIM signing for this identity; ``false`` to disable it. 

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {}
        
      **Response Structure** 

      

      - *(dict) --* 

        An empty element. Receiving this element indicates that the request completed successfully.

        
    

  .. py:method:: set_identity_feedback_forwarding_enabled(**kwargs)

    

    Given an identity (email address or domain), enables or disables whether Amazon SES forwards bounce and complaint notifications as email. Feedback forwarding can only be disabled when Amazon Simple Notification Service (Amazon SNS) topics are specified for both bounces and complaints.

     

    .. note::

      Feedback forwarding does not apply to delivery notifications. Delivery notifications are only available through Amazon SNS.

     

    This action is throttled at one request per second.

     

    For more information about using notifications with Amazon SES, see the `Amazon SES Developer Guide`_ .

    

    **Request Syntax** 
    ::

      response = client.set_identity_feedback_forwarding_enabled(
          Identity='string',
          ForwardingEnabled=True|False
      )
    :type Identity: string
    :param Identity: **[REQUIRED]** 

      The identity for which to set bounce and complaint notification forwarding. Examples: ``user@example.com`` , ``example.com`` .

      

    
    :type ForwardingEnabled: boolean
    :param ForwardingEnabled: **[REQUIRED]** 

      Sets whether Amazon SES will forward bounce and complaint notifications as email. ``true`` specifies that Amazon SES will forward bounce and complaint notifications as email, in addition to any Amazon SNS topic publishing otherwise specified. ``false`` specifies that Amazon SES will publish bounce and complaint notifications only through Amazon SNS. This value can only be set to ``false`` when Amazon SNS topics are set for both ``Bounce`` and ``Complaint`` notification types.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {}
        
      **Response Structure** 

      

      - *(dict) --* 

        An empty element. Receiving this element indicates that the request completed successfully.

        
    

  .. py:method:: set_identity_notification_topic(**kwargs)

    

    Given an identity (email address or domain), sets the Amazon Simple Notification Service (Amazon SNS) topic to which Amazon SES will publish bounce, complaint, and/or delivery notifications for emails sent with that identity as the ``Source`` .

     

    .. note::

      Unless feedback forwarding is enabled, you must specify Amazon SNS topics for bounce and complaint notifications. For more information, see ``SetIdentityFeedbackForwardingEnabled`` . 

     

    This action is throttled at one request per second.

     

    For more information about feedback notification, see the `Amazon SES Developer Guide`_ .

    

    **Request Syntax** 
    ::

      response = client.set_identity_notification_topic(
          Identity='string',
          NotificationType='Bounce'|'Complaint'|'Delivery',
          SnsTopic='string'
      )
    :type Identity: string
    :param Identity: **[REQUIRED]** 

      The identity for which the Amazon SNS topic will be set. You can specify an identity by using its name or by using its Amazon Resource Name (ARN). Examples: ``user@example.com`` , ``example.com`` , ``arn:aws:ses:us-east-1:123456789012:identity/example.com`` .

      

    
    :type NotificationType: string
    :param NotificationType: **[REQUIRED]** 

      The type of notifications that will be published to the specified Amazon SNS topic.

      

    
    :type SnsTopic: string
    :param SnsTopic: 

      The Amazon Resource Name (ARN) of the Amazon SNS topic. If the parameter is omitted from the request or a null value is passed, ``SnsTopic`` is cleared and publishing is disabled.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {}
        
      **Response Structure** 

      

      - *(dict) --* 

        An empty element. Receiving this element indicates that the request completed successfully.

        
    

  .. py:method:: verify_domain_dkim(**kwargs)

    

    Returns a set of DKIM tokens for a domain. DKIM *tokens* are character strings that represent your domain's identity. Using these tokens, you will need to create DNS CNAME records that point to DKIM public keys hosted by Amazon SES. Amazon Web Services will eventually detect that you have updated your DNS records; this detection process may take up to 72 hours. Upon successful detection, Amazon SES will be able to DKIM-sign email originating from that domain.

     

    This action is throttled at one request per second.

     

    To enable or disable Easy DKIM signing for a domain, use the ``SetIdentityDkimEnabled`` action.

     

    For more information about creating DNS records using DKIM tokens, go to the `Amazon SES Developer Guide`_ .

    

    **Request Syntax** 
    ::

      response = client.verify_domain_dkim(
          Domain='string'
      )
    :type Domain: string
    :param Domain: **[REQUIRED]** 

      The name of the domain to be verified for Easy DKIM signing.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'DkimTokens': [
                'string',
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 

        Represents the DNS records that must be published in the domain name's DNS to complete DKIM setup.

        
        

        - **DkimTokens** *(list) --* 

          A set of character strings that represent the domain's identity. If the identity is an email address, the tokens represent the domain of that address.

           

          Using these tokens, you will need to create DNS CNAME records that point to DKIM public keys hosted by Amazon SES. Amazon Web Services will eventually detect that you have updated your DNS records; this detection process may take up to 72 hours. Upon successful detection, Amazon SES will be able to DKIM-sign emails originating from that domain.

           

          For more information about creating DNS records using DKIM tokens, go to the `Amazon SES Developer Guide`_ .

          
          

          - *(string) --* 
      
    

  .. py:method:: verify_domain_identity(**kwargs)

    

    Verifies a domain.

     

    This action is throttled at one request per second.

    

    **Request Syntax** 
    ::

      response = client.verify_domain_identity(
          Domain='string'
      )
    :type Domain: string
    :param Domain: **[REQUIRED]** 

      The domain to be verified.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'VerificationToken': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 

        Represents a token used for domain ownership verification.

        
        

        - **VerificationToken** *(string) --* 

          A TXT record that must be placed in the DNS settings for the domain, in order to complete domain verification.

          
    

  .. py:method:: verify_email_address(**kwargs)

    

    Verifies an email address. This action causes a confirmation email message to be sent to the specified address.

     

    .. warning::

      The VerifyEmailAddress action is deprecated as of the May 15, 2012 release of Domain Verification. The VerifyEmailIdentity action is now preferred.

     

    This action is throttled at one request per second.

    

    **Request Syntax** 
    ::

      response = client.verify_email_address(
          EmailAddress='string'
      )
    :type EmailAddress: string
    :param EmailAddress: **[REQUIRED]** 

      The email address to be verified.

      

    
    
    :returns: None

  .. py:method:: verify_email_identity(**kwargs)

    

    Verifies an email address. This action causes a confirmation email message to be sent to the specified address.

     

    This action is throttled at one request per second.

    

    **Request Syntax** 
    ::

      response = client.verify_email_identity(
          EmailAddress='string'
      )
    :type EmailAddress: string
    :param EmailAddress: **[REQUIRED]** 

      The email address to be verified.

      

    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {}
        
      **Response Structure** 

      

      - *(dict) --* 

        An empty element. Receiving this element indicates that the request completed successfully.

        
    

==========
Paginators
==========


The available paginators are:

* :py:class:`SES.Paginator.list_identities`



.. py:class:: SES.Paginator.list_identities

  ::

    
    paginator = client.get_paginator('list_identities')

  
  

  .. py:method:: paginate(**kwargs)

    Creates an iterator that will paginate through responses from :py:meth:`SES.Client.list_identities`.

    **Request Syntax** 
    ::

      response_iterator = paginator.paginate(
          IdentityType='EmailAddress'|'Domain',
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
    :type IdentityType: string
    :param IdentityType: 

      The type of the identities to list. Possible values are "EmailAddress" and "Domain". If this parameter is omitted, then all identities will be listed.

      

    
    :type PaginationConfig: dict
    :param PaginationConfig: 

      A dictionary that provides parameters to control pagination.

      

    
      - **MaxItems** *(integer) --* 

        The total number of items to return. If the total number of items available is more than the value specified in max-items then a ``NextToken`` will be provided in the output that you can use to resume pagination.

        

      
      - **PageSize** *(integer) --* 

        The size of each page.

        

      
      - **StartingToken** *(string) --* 

        A token to specify where to start paginating. This is the ``NextToken`` from a previous response.

        

      
    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax** 

      
      ::

        {
            'Identities': [
                'string',
            ],
            
        }
      **Response Structure** 

      

      - *(dict) --* 

        Represents a list of all verified identities for the AWS Account.

        
        

        - **Identities** *(list) --* 

          A list of identities.

          
          

          - *(string) --* 
      
    

=======
Waiters
=======


The available waiters are:

* :py:class:`SES.Waiter.identity_exists`



.. py:class:: SES.Waiter.identity_exists

  ::

    
    waiter = client.get_waiter('identity_exists')

  
  

  .. py:method:: wait(**kwargs)

    This polls :py:meth:`SES.Client.get_identity_verification_attributes` every 3 seconds until a successful state is reached. An error is returned after 20 failed checks.

    **Request Syntax** 
    ::

      waiter.wait(
          Identities=[
              'string',
          ]
      )
    :type Identities: list
    :param Identities: **[REQUIRED]** 

      A list of identities.

      

    
      - *(string) --* 

      
  
    
    :returns: None