sendCustomVerificationEmail method

Future<SendCustomVerificationEmailResponse> sendCustomVerificationEmail({
  1. required String emailAddress,
  2. required String templateName,
  3. String? configurationSetName,
})

Adds an email address to the list of identities for your Amazon SES account in the current AWS 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.

May throw MessageRejected. May throw ConfigurationSetDoesNotExistException. May throw CustomVerificationEmailTemplateDoesNotExistException. May throw FromEmailAddressNotVerifiedException. May throw ProductionAccessNotGrantedException.

Parameter emailAddress : The email address to verify.

Parameter templateName : The name of the custom verification email template to use when sending the verification email.

Parameter configurationSetName : Name of a configuration set to use when sending the verification email.

Implementation

Future<SendCustomVerificationEmailResponse> sendCustomVerificationEmail({
  required String emailAddress,
  required String templateName,
  String? configurationSetName,
}) async {
  ArgumentError.checkNotNull(emailAddress, 'emailAddress');
  ArgumentError.checkNotNull(templateName, 'templateName');
  final $request = <String, dynamic>{};
  $request['EmailAddress'] = emailAddress;
  $request['TemplateName'] = templateName;
  configurationSetName?.also((arg) => $request['ConfigurationSetName'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'SendCustomVerificationEmail',
    version: '2010-12-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['SendCustomVerificationEmailRequest'],
    shapes: shapes,
    resultWrapper: 'SendCustomVerificationEmailResult',
  );
  return SendCustomVerificationEmailResponse.fromXml($result);
}