FRTc@sddlZddlZddlmZmZddlmZddlmZddl m Z ddl Z ddl Z ddl mZdefdYZdS( iN(tsixturllib(tAWSAuthConnection(tBotoServerError(t RegionInfo(t exceptionst SESConnectioncBs7eZeZdZdZdZddeddddddddddeddZ dZ dZ ddZ d Z ddd ddddd Zddd Zd ZdZdZdZdZdZdZdZdZdZdZdZdZddZedZRS(s us-east-1semail.us-east-1.amazonaws.coms 2010-12-01it/cCs}| s!t||j|j} n| |_tt|j|jj||||||||| | | d| d|d| dS(Ntsecurity_tokentvalidate_certst profile_name(RtDefaultRegionNametDefaultRegionEndpointtregiontsuperRt__init__tendpoint(tselftaws_access_key_idtaws_secret_access_keyt is_securetporttproxyt proxy_portt proxy_usert proxy_passtdebugthttps_connection_factoryR tpathRR R ((s@/opt/freeware/lib/python2.7/site-packages/boto/ses/connection.pyR)s     cCsdgS(Ntses((R((s@/opt/freeware/lib/python2.7/site-packages/boto/ses/connection.pyt_required_auth_capability;scCsbt|tjr|g}nx=tdt|dD]"}||d|d||fs   c Cs&d}i|d6}|pi}||dtlogterrorR=treasontses_exceptionstSESAddressBlacklistedErrortSESAddressNotVerifiedErrortSESDailyQuotaExceededErrortSESMaxSendingRateExceededErrortSESDomainEndsWithDotErrortSESLocalAddressCharacterErrortSESIllegalAddressErrortretsearchtSESIdentityNotVerifiedErrortSESDomainNotConfirmedErrort ResponseError(RRHRItExceptionToRaiset exc_reason((s@/opt/freeware/lib/python2.7/site-packages/boto/ses/connection.pyRCys@                             ttextc Csx|jj}|dk rr|dkrN| dk rEtdn|} qr| dk ritdn|} ni|d6|d6} | r| | d`_. :type domain: string :param domain: The domain name. tVerifyDomainDkimtDomain(RN(Rtdomain((s@/opt/freeware/lib/python2.7/site-packages/boto/ses/connection.pytverify_domain_dkims cCs*|jdi|d6|rdndd6S(sEnables or disables 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. :type identity: string :param identity: An email address or domain name. :type dkim_enabled: bool :param dkim_enabled: Specifies whether or not to enable DKIM signing. tSetIdentityDkimEnabledtIdentityttruetfalset DkimEnabled(RN(Rtidentityt dkim_enabled((s@/opt/freeware/lib/python2.7/site-packages/boto/ses/connection.pytset_identity_dkim_enableds cCs)i}|j||d|jd|S(sfGet attributes associated with a list of verified identities. Given a list of verified identities (email addresses and/or domains), returns a structure describing identity notification attributes. :type identities: list :param identities: A list of verified identities (email addresses and/or domains). sIdentities.membertGetIdentityDkimAttributes(R'RN(Rt identitiesR#((s@/opt/freeware/lib/python2.7/site-packages/boto/ses/connection.pytget_identity_dkim_attributess cCs |jdS(s+Returns a list containing all of the identities (email addresses and domains) for a specific AWS Account, regardless of verification status. :rtype: dict :returns: A ListIdentitiesResponse structure. Note that keys must be unicode strings. tListIdentities(RN(R((s@/opt/freeware/lib/python2.7/site-packages/boto/ses/connection.pytlist_identitiess cCs)i}|j||d|jd|S(sGiven a list of identities (email addresses and/or domains), returns the verification status and (for domain identities) the verification token for each identity. :type identities: list of strings or string :param identities: List of identities. :rtype: dict :returns: A GetIdentityVerificationAttributesResponse structure. Note that keys must be unicode strings. sIdentities.membert!GetIdentityVerificationAttributes(R'RN(RRR#((s@/opt/freeware/lib/python2.7/site-packages/boto/ses/connection.pyt$get_identity_verification_attributess  cCs|jdi|d6S(sVerifies a domain. :type domain: string :param domain: The domain to be verified. :rtype: dict :returns: A VerifyDomainIdentityResponse structure. Note that keys must be unicode strings. tVerifyDomainIdentityR(RN(RR((s@/opt/freeware/lib/python2.7/site-packages/boto/ses/connection.pytverify_domain_identitys cCs|jdi|d6S(sqVerifies an email address. This action causes a confirmation email message to be sent to the specified address. :type email_adddress: string :param email_address: The email address to be verified. :rtype: dict :returns: A VerifyEmailIdentityResponse structure. Note that keys must be unicode strings. tVerifyEmailIdentityR(RN(RR((s@/opt/freeware/lib/python2.7/site-packages/boto/ses/connection.pytverify_email_identitys cCs|jdi|d6S(sJDeletes the specified identity (email address or domain) from the list of verified identities. :type identity: string :param identity: The identity to be deleted. :rtype: dict :returns: A DeleteIdentityResponse structure. Note that keys must be unicode strings. tDeleteIdentityR(RN(RR((s@/opt/freeware/lib/python2.7/site-packages/boto/ses/connection.pytdelete_identitys cCs7i|d6|d6}|r'||dtboto.jsonresponsetboto.sesRRRR(((s@/opt/freeware/lib/python2.7/site-packages/boto/ses/connection.pyts