I am working on a project that involves use of a transactional email service (like sendgrid). My question is can we create a CNAME in our domain DNS (i.e. smtp.example.com or client1.example.com) that refers to the email service smtp server?
This will mask the SMTP server of the service (i.e. sendgrid, mailgun) we use.
Our goal is to vary the DNS entry depending on our client. As an example, we might have client1.example.com, client2.example.com, etc. Each client subdomain would be a CNAME to the email service. We could also switch email services just by changing where the CNAME refers if needed. As an example:
NAME TYPE VALUE
--------------------------------------------------
client1.example.com CNAME smtp.emailservice.com
client2.example.com CNAME smtp.emailservice.com
In doing research on this it appears to work, but I wanted to see if there were any issues that I should look for. We are not dealing with MX records, POP3, or any incoming emails at all, nor can we use an API for sending. It has to go through SMTP.
Thank you!