本文整理汇总了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
示例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
示例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
示例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)