Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can add/verify dynamically domains and email addresses to amazon SES?

I used a service for mailing my users and that service uses amazon SES to send emails.

When I signed up and did setup a sender agent, that service just required two things:

  1. company name which I typed "cmpny".
  2. agent name which I selected from a predefined list, I chose "joe" .

thus the result was a sender email address [email protected](displayed just bellow the form) and after submit the form I tested the mailing feature and it did work immediately.

I know (by aws docs) that an entity (either domain or email address) needs to be verified before get work therefore that requirement demands a manual operation.

How did this service (in an automatically way) ...

  • verify cmpny.email-service.com domain in SES ?
  • verify [email protected] address in SES?

thanks in advance.

like image 835
geoom Avatar asked Aug 03 '18 01:08

geoom


1 Answers

By using SES, you just need to verify the root domain, in this case email-service.com. Then email-service.com can create any quantity of subdomains they want using Route53 like cmpny.email-service.com and send emails using the created subdomain without any additional check.

Check the AWS docs page about this subject at verify-domains, or the excerpt that explains it below:

If you verify a domain with Amazon SES, you can send from any subdomain of that domain without specifically verifying the subdomain. For example, if you verify example.com, you do not need to verify a.example.com or a.b.example.com. As specified in RFC 1034, each DNS label can have up to 63 characters and the whole domain name must not exceed a total length of 255 characters.

like image 172
Alessandro Oliveira Avatar answered Oct 31 '22 14:10

Alessandro Oliveira