Manage email verifications for CU Emails.
Perform following operations on a list of emails:
- verifyEmails: Sends an email to each of the emails in the
list. Amazon verifies that the email is
syntaxically correct first. (Each email is
a call to AWS SES.)
- getVerification: Sends Amazon a list of emails and Amazon
returns a list of emails and the statuses.
(Emails that Amazon doesn't have are not
returned.)
- removeEmails: Sends a request to Amazon to remove email from
the list of identities. (Each email is a call
to AWS SES.)
Default AWS_REGION is `us-west-2` but the tempalte can be created and verified
in other regions by setting up AWS_REGION env variable (check aws
docuementation for restrictions in certain regions.)
As of 2018-10-02, `HomeCUVerificationEmailTemplate` is the default
custom tempalte being and already should exist in the expected aws
region before running this script.
Fun fact, if you resend email verification request to an email which is already
verified, using the custom verification email template, aws ses will change
the status from verified to pending and the recipient will have to verify the
email again. This is not the case when you send email verifications using
aws's default process (i.e. not using custom verification email templates).