当前位置: 首页>>代码示例>>Python>>正文


Python SESConnection.delete_verified_email_address方法代码示例

本文整理汇总了Python中boto.ses.SESConnection.delete_verified_email_address方法的典型用法代码示例。如果您正苦于以下问题:Python SESConnection.delete_verified_email_address方法的具体用法?Python SESConnection.delete_verified_email_address怎么用?Python SESConnection.delete_verified_email_address使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在boto.ses.SESConnection的用法示例。


在下文中一共展示了SESConnection.delete_verified_email_address方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: handle

# 需要导入模块: from boto.ses import SESConnection [as 别名]
# 或者: from boto.ses.SESConnection import delete_verified_email_address [as 别名]
    def handle(self, *args, **options):

        verbosity = options.get("verbosity", 0)
        add_email = options.get("add", False)
        delete_email = options.get("delete", False)
        list_emails = options.get("list", False)

        access_key_id = getattr(settings, "AWS_ACCESS_KEY_ID", None)
        access_key = getattr(settings, "AWS_SECRET_ACCESS_KEY", None)

        connection = SESConnection(aws_access_key_id=access_key_id, aws_secret_access_key=access_key)

        if add_email:
            if verbosity != "0":
                print "Adding email: %s" % add_email
            connection.verify_email_address(add_email)
        elif delete_email:
            if verbosity != "0":
                print "Removing email: %s" % delete_email
            connection.delete_verified_email_address(delete_email)
        elif list_emails:
            if verbosity != "0":
                print "Fetching list of verified emails:"
            response = connection.list_verified_email_addresses()
            emails = response["ListVerifiedEmailAddressesResponse"]["ListVerifiedEmailAddressesResult"][
                "VerifiedEmailAddresses"
            ]
            for email in emails:
                print email
开发者ID:philipkimmey,项目名称:django-ses,代码行数:31,代码来源:ses_email_address.py

示例2: handle

# 需要导入模块: from boto.ses import SESConnection [as 别名]
# 或者: from boto.ses.SESConnection import delete_verified_email_address [as 别名]
    def handle(self, *args, **options):

        verbosity = options.get('verbosity', 0)
        add_email = options.get('add', False)
        delete_email = options.get('delete', False)
        list_emails = options.get('list', False)

        access_key_id = settings.ACCESS_KEY
        access_key = settings.SECRET_KEY
        region = RegionInfo(
            name=settings.AWS_SES_REGION_NAME,
            endpoint=settings.AWS_SES_REGION_ENDPOINT)

        connection = SESConnection(
                aws_access_key_id=access_key_id,
                aws_secret_access_key=access_key,
                region=region)

        if add_email:
            if verbosity != '0':
                print "Adding email: %s" % add_email
            connection.verify_email_address(add_email)
        elif delete_email:
            if verbosity != '0':
                print "Removing email: %s" % delete_email
            connection.delete_verified_email_address(delete_email)
        elif list_emails:
            if verbosity != '0':
                print "Fetching list of verified emails:"
            response = connection.list_verified_email_addresses()
            emails = response['ListVerifiedEmailAddressesResponse'][
                'ListVerifiedEmailAddressesResult']['VerifiedEmailAddresses']
            for email in emails:
                print email
开发者ID:tricoder42,项目名称:django-ses,代码行数:36,代码来源:ses_email_address.py

示例3: handle

# 需要导入模块: from boto.ses import SESConnection [as 别名]
# 或者: from boto.ses.SESConnection import delete_verified_email_address [as 别名]
 def handle(self, *args, **options):
     
     verbosity = options.get('verbosity', 0)
     add_email = options.get('add', False)
     delete_email = options.get('delete', False)
     list_emails = options.get('list', False)
     
     access_key_id = getattr(settings, 'AWS_ACCESS_KEY_ID', None)
     access_key = getattr(settings, 'AWS_SECRET_ACCESS_KEY', None)
     api_endpoint = getattr(settings, 'AWS_SES_API_HOST',
                                  SESConnection.DefaultHost)
     
     connection = SESConnection(
             aws_access_key_id=access_key_id,
             aws_secret_access_key=access_key,
             host=api_endpoint,
         )
     
     if add_email:
         if verbosity != '0':
             print "Adding email: %s"  % add_email
         connection.verify_email_address(add_email)
     elif delete_email:
         if verbosity != '0':
             print "Removing email: %s" % delete_email
         connection.delete_verified_email_address(delete_email)
     elif list_emails:
         if verbosity != '0':
             print "Fetching list of verified emails:"
         response = connection.list_verified_email_addresses()
         emails = response['ListVerifiedEmailAddressesResponse']['ListVerifiedEmailAddressesResult']['VerifiedEmailAddresses']
         for email in emails:
             print email
开发者ID:Teaspiller,项目名称:django-ses,代码行数:35,代码来源:ses_email_address.py

示例4: handle

# 需要导入模块: from boto.ses import SESConnection [as 别名]
# 或者: from boto.ses.SESConnection import delete_verified_email_address [as 别名]
    def handle(self, *args, **options):

        verbosity = options.get('verbosity', 0)
        add_email = options.get('add', False)
        delete_email = options.get('delete', False)
        list_emails = options.get('list', False)

        access_key_id = settings.ACCESS_KEY
        access_key = settings.SECRET_KEY
        region = RegionInfo(
            name=settings.AWS_SES_REGION_NAME,
            endpoint=settings.AWS_SES_REGION_ENDPOINT)
        proxy = settings.AWS_SES_PROXY
        proxy_port = settings.AWS_SES_PROXY_PORT
        proxy_user = settings.AWS_SES_PROXY_USER
        proxy_pass = settings.AWS_SES_PROXY_PASS


        connection = SESConnection(
                aws_access_key_id=access_key_id,
                aws_secret_access_key=access_key,
                region=region,
                proxy=proxy,
                proxy_port=proxy_port,
                proxy_user=proxy_user,
                proxy_pass=proxy_pass,
        )

        if add_email:
            if verbosity != '0':
                print("Adding email: " + add_email)
            connection.verify_email_address(add_email)
        elif delete_email:
            if verbosity != '0':
                print("Removing email: " + delete_email)
            connection.delete_verified_email_address(delete_email)
        elif list_emails:
            if verbosity != '0':
                print("Fetching list of verified emails:")
            response = connection.list_verified_email_addresses()
            emails = response['ListVerifiedEmailAddressesResponse'][
                'ListVerifiedEmailAddressesResult']['VerifiedEmailAddresses']
            for email in emails:
                print(email)
开发者ID:GradConnection,项目名称:django-ses,代码行数:46,代码来源:ses_email_address.py


注:本文中的boto.ses.SESConnection.delete_verified_email_address方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。