Part II: How to verify a domain and set up an email with Amazon SES
Verifying domain and setting up email
To set up an email with Amazon SES, the domain has to be verified. The other option is to verify an email address. An advantage to verifying the entire domain is that all the possible recipient emails will be validated. For example, you can have admin@website.com, hello@website.com, welcome@website.com, etc. You need not have to verify every single recipient.
The main steps are:
- Verifying a domain
- Setting up a receipt rule
- Sending a test email
- Viewing the test email
Verifying a domain
- Sign in to the AWS console and navigate to the SES dashboard.
- Click Domains under Identity Management from the sidebar.
- Click Verify a New Domain.
- Domain settings:
Domain: Type in the domain name that needs to be valid. Do not include www
Check the Generate DKIM Settings box.
- Click Verify This Domain
A modal will open up with DNS records.
- Check the Email Receiving Record checkbox.
- Make sure that the Hosted Zone checkbox is also checked.
- Click Create Record Sets
The status will show up as Pending Verification.
- Refresh the page. It should change to verified. If not, wait for a few minutes and refresh the page again. This process is usually very fast.
If you navigate to the AWS Route 53 dashboard and look at the record names. Five new record sets will have been created. Four will be of Type as ‘CNAME’ and one will be of Type ‘TXT’.
Setting up a receipt rule
To start receiving emails, you have to create a receipt rule and set it as the active set. When this receipt rule is created, SES will use it as the default set.
- If you are not in the SES dashboard, navigate to AWS SES.
- From the left sidebar, choose Rule Sets from under Email Receiving.
- Click Create a New Rule Set
- Give the rule set a name and click Create a Rule Set
- Click Create Rule in the next screen
- Leave the text box under Recipient empty so that all the recipients that come under the verified domain will be valid and accepted.
- Click Next Step
- Click <Select an action type> and from the drop-down box, choose S3
- Action settings:
S3 bucket: enter a name for the bucket
Encrypt message: If it is left unchecked, it will be easier to read the test email that will be sent in the upcoming steps
SNS topic: (default) aws/ses
- Click Next Step
- Rule details:
Rule name: Give the rule a name
Enabled: Enable it by checking the box
Require TLS: Enable it by checking the box
Enable span and virus scanning: Enable it by checking the box
Rule Set: default-rule-set
Insert after rule: <Beginning>
- Click Next Step
- Review the information and click Create Rule
A rule will be created and it will be set as active. Now, it is possible to receive emails.
Sending a test email
Use any of your email accounts to send an email to any of the valid email addresses for the domain.
It can be anything like user@website.com or one@website.com.
Viewing the test email
All the emails will be stored in an S3 bucket. In order to view the test email that was sent in the previous step, navigate to the AWS S3 dashboard.
- Look for the bucket that was created for the rule set in the previous steps and click on it.
There will be a file with the name AMAZON_SES_SETUP_NOTIFICATION with the following information.
Hello,You received this message because you attempted to set up Amazon SES to deliver emails to this S3 bucket.Please note that the rule that you configured to deliver emails to this S3 bucket is only valid if the entire setup process is successful. For more information aboutsetting up email-receiving rules, see the Amazon SES Developer Guide at http://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html .Thank you for using Amazon SES!The Amazon SES Team
There will be another file with a unique string of letters and numbers. It will be something like this: 8jhpa9pghortv697300cbhme3jurcd8475ivfi81
- Click on the checkbox in front of the file name.
- Click Actions and then download.
- Open the file in the text editor and you can see the email that you sent.
If the article helped you, I would appreciate a cup of coffee.
Reference: