Adds an email address to the list of identities for your Amazon SES account in the current Amazon Web Services Region and attempts to verify it. As a result of executing this operation, a customized verification email is sent to the specified address.
To use this operation, you must first create a custom verification email template. For more information about creating and using custom verification email templates, see Using custom verification email templates in the Amazon SES Developer Guide.
You can execute this operation no more than once per second.
Parameters:
-
email_address
(EmailAddress)
–
The email address to verify.
-
template_name
(EmailTemplateName)
–
The name of the custom verification email template to use when sending the verification email.
-
configuration_set_name
(Optional[ConfigurationSetName], default:
None
)
–
Name of a configuration set to use when sending the verification email.
Raises:
Source code in docs_src/capo_sesv2/_services/async_se_sv2.py
| async def send_custom_verification_email(
self,
email_address: "capo_sesv2.types.email_address.EmailAddress",
template_name: "capo_sesv2.types.email_template_name.EmailTemplateName",
*,
config_overrides: Optional[AsyncSESv2ClientConfig] = None,
configuration_set_name: Optional[
"capo_sesv2.types.configuration_set_name.ConfigurationSetName"
] = None,
) -> "capo_sesv2.types.send_custom_verification_email_response.SendCustomVerificationEmailResponse":
"""<p>Adds an email address to the list of identities for your Amazon SES account in the current Amazon Web Services Region and attempts to verify it. As a result of executing this operation, a customized verification email is sent to the specified address.</p> <p>To use this operation, you must first create a custom verification email template. For more information about creating and using custom verification email templates, see <a href="https://docs.aws.amazon.com/ses/latest/dg/creating-identities.html#send-email-verify-address-custom">Using custom verification email templates</a> in the <i>Amazon SES Developer Guide</i>.</p> <p>You can execute this operation no more than once per second.</p>
Args:
email_address: <p>The email address to verify.</p>
template_name: <p>The name of the custom verification email template to use when sending the verification email.</p>
configuration_set_name: <p>Name of a configuration set to use when sending the verification email.</p>
Raises:
capo_sesv2.errors.bad_request_exception.BadRequestException: <p>The input you provided is invalid.</p>
capo_sesv2.errors.limit_exceeded_exception.LimitExceededException: <p>There are too many instances of the specified resource type.</p>
capo_sesv2.errors.mail_from_domain_not_verified_exception.MailFromDomainNotVerifiedException: <p>The message can't be sent because the sending domain isn't verified.</p>
capo_sesv2.errors.message_rejected.MessageRejected: <p>The message can't be sent because it contains invalid content.</p>
capo_sesv2.errors.not_found_exception.NotFoundException: <p>The resource you attempted to access doesn't exist.</p>
capo_sesv2.errors.sending_paused_exception.SendingPausedException: <p>The message can't be sent because the account's ability to send email is currently paused.</p>
capo_sesv2.errors.too_many_requests_exception.TooManyRequestsException: <p>Too many requests have been made to the operation.</p>
capo_sesv2.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_sesv2.types.send_custom_verification_email_request.SendCustomVerificationEmailRequest]",
) -> AsyncOperationResponse[
"capo_sesv2.types.send_custom_verification_email_response.SendCustomVerificationEmailResponse"
]:
import capo_sesv2._operations.simple_email_service_v2.send_custom_verification_email
(
output,
http_response,
) = await capo_sesv2._operations.simple_email_service_v2.send_custom_verification_email.async_send_custom_verification_email(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("SendCustomVerificationEmail")
)
input_: capo_sesv2.types.send_custom_verification_email_request.SendCustomVerificationEmailRequest = {
"email_address": email_address,
"template_name": template_name,
}
if configuration_set_name is not None:
input_["configuration_set_name"] = configuration_set_name
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|