Sending email with Vercel Domains
To send emails with a custom domain, we need to:
- Buy the domain
- Purchase email hosting
- Configure DNS records on the domain
We will focus on steps two and three in this post. This post assumes you are using a domain purchased through Vercel and have
now CLI access configured.
You might be asking yourself:
Why can't we use Vercel (or other domain provider) for emails? Do I really need to pay more money?
The answer is yes. You do need to buy hosting. Namecheap has a pretty good description of why you need email hosting. Think of it as the same thing as website hosting, except for your emails.
GSuite is an alright product for sending emails from custom domains. This tool focuses on enterprise businesses, so the UX leaves something to be desired.
Sign up for GSuite 💰💸
Confirm you own the domain.
In GSuite admin, go to Manage Domains. Click Add A Domain or Domain Alias.
To verify you own the domain, you will need to set a TXT record on your domain's DNS settings.
With Vercel's CLI, it looks like the following:
List out your domains
vercel dns ls
Using Google's verification code, run the following command
vercel dns add YOURDOMAINHERE.com @ TXT YOURGOOGLEVERIFICATIONSTRINGHERE
Press Validate in GSuite and then Google will try to confirm you own the domain. It may take some time before this works, be patient.
Setup MX records.
After you prove you own the domain, it's time to start forwarding emails to Google.
This is also done via DNS records on your domain. Run each of these in your CLI.
Update: Vercel added a feature to cover this step. Go to your domain, select "add email preset", and click "G Suite".
Then verify the MX records with GSuite.
Configure Gmail and GSuite.
Now, head over to Gmail.
Click on the settings gear, Accounts, and then “Add another email address”.
Enter in your new email and select “Treat as an alias”.
You may see the error:
Functionality not enabled. You must send emails through YOURDOMAINHERE.com SMTP servers when you send as you@YOURDOMAINHERE.com. However, this functionality is not available for your account. Please contact your domain administrator for more information.
To fix this error, hop over to the Gmail settings in GSuite for End User Access and enable “Allow per-user outbound gateways”.
Wait a few minutes and add the email address again in Gmail to resolve this issue.
If you want to test out your new email, send me an email from your new account at