An Amazon SES identity is an email address or domain that Amazon SES uses to send email. Amazon SES requires
you to verify your email identities, confirming that you own them and preventing others
from using them.

The Scenario

In this example, you use a series of Node.js modules to verify and manage Amazon SES
identities. The Node.js modules use the SDK for JavaScript to verify email addresses
and domains,
using these methods of the AWS.SES client class:

Listing Your Identities

In this example, use a Node.js module to list email addresses and domains to use with
Amazon SES. Create a Node.js module with the file name
ses_listidentities.js. Configure the SDK as previously shown.

Create an object to pass the IdentityType and other parameters for the listIdentities method of the AWS.SES client
class. To call the listIdentities method, create a promise for invoking an Amazon SES service object, passing the parameters
object.

Then handle the response in the promise callback. The data
returned by the promise contains an array of domain identities as specified by the
IdentityType parameter.

Verifying an Email Address Identity

In this example, use a Node.js module to verify email senders to use with Amazon SES.
Create
a Node.js module with the file name ses_verifyemailidentity.js.
Configure the SDK as previously shown. To access Amazon SES, create an
AWS.SES service object.

Create an object to pass the EmailAddress parameter for the verifyEmailIdentity method of the AWS.SES client
class. To call the verifyEmailIdentity method, create a promise for invoking an Amazon SES service object, passing the parameters.
Then
handle the response in the promise callback.

Verifying a Domain Identity

In this example, use a Node.js module to verify email domains to use with Amazon SES.
Create a Node.js module with the file name
ses_verifydomainidentity.js. Configure the SDK as previously shown.

Create an object to pass the Domain parameter for the verifyDomainIdentity method of the AWS.SES client class. To call the verifyDomainIdentity method, create a promise for invoking an Amazon SES
service object, passing the parameters object. Then handle the response in the promise callback.

Deleting Identities

In this example, use a Node.js module to delete email addresses or domains used with
Amazon SES. Create a Node.js module with the file name
ses_deleteidentity.js. Configure the SDK as previously shown.

Create an object to pass the Identity parameter for the deleteIdentity method
of the AWS.SES client class. To call the deleteIdentity method, create a request for invoking an Amazon SES
service object, passing the parameters. Then handle the response in the promise callback..