Using GMail To Send Email From A Custom Domain

Establishing a free façade for email communication via your domain using a personal GMail account.

Published on 04 January 2021

TL;DR

Do you use a domain registrar that provides email forwarding facilities? Then read this post to see how to set up Gmail to ensure the correct "From" address when replying to emails sent to your domains.

Intro

I am currently working with a couple of co-founders on an early stage start-up about which I hope to share more information shortly. Part of the prep work for this start-up has been registering a domain name and establishing communications channels.

To do this, I use a domain registrar that provides free email forwarding facilities. This is great as it allows you to receive email sent to '[person]@[yourdomain.com]' as part of your regular email account. However, if you subsequently reply to email you received this way, your reply will be "From" your regular email account, not '[person]@[yourdomain.com]'.

In this post I detail how to establish a completely free façade for email communication via your domain using a personal GMail account to receive and reply to email using a custom domain email addresses.

Prerequisites

Prior to following the steps below, you should ensure that you've enabled Two-Factor Authentication (2FA) on your GMail account. While it is possible to follow these steps without 2FA, this is not recommended as 2FA is basic practice for good security.

You should also ensure you're able to receive email forwarded by your domain registrar in your GMail account. As each domain registrar will provide different mechanisms for setting up and maintaining email forwarding rules, it will not be covered as part of this post. So, before following the steps below, you should ensure you're able to send an email to '[person]@[yourdomain.com]' and receive it in your GMail account.

App Password

Before being able to set up "Send mail as" functionality, you'll need an 'App Password'. An 'App Password' allows software/authentication flows that aren't compatible with 2FA to successfully authenticate with Google Services and is essentially just a 'special' password that is a) highly complex - to prevent brute-force attacks, and b) can be revoked should it ever be compromised.

To set up an 'App Password', from your GMail inbox click your account icon in the top right hand corner, then click "Manage your Google Account" as shown below:

Manage GMail Account

This will open a new tab for managing your Google Account. Select the "Security" category from the menu on the left (or across the top on smaller devices) and scroll down to the "Signing in to Google" section. Here, you should see that 2-Step verification has been turned on (if it isn't, turn it on now before continuing) and an "App passwords" option as shown below:

Signing In To Google

Click the "App passwords" option to create a new App password. In the "Select app" drop-down select "Other (Custom name)" and enter a name for the app password (I tend to use the domain name). Once this is entered click the Generate button as shown below:

Add App Password

Clicking "Generate" will display a dialog containing your new app password as shown below. Copy this password and keep it safe (I would recommend adding it to your password manager).

New App Password

You can now close the "Google Account" tab and return to Gmail.

Send Mail As

Back in GMail, click the 'cog' icon in the top right to display "Quick Settings" and, from there, click the "See all settings" button as shown below:

See All Gmail Settings

This will take you to the Settings page where you should see an "Accounts and Import" category. Click this category to reveal the "Send mail as" options as shown below:

Send Mail As

Click the "Add another email address" link which will display a new window allowing you to "Enter information about your other email address". In the "Email Address" text box, enter the email address of the domain account set up to forward email to your Gmail account as shown below:

Enter EMail Address

Click "Next Step >>" to reveal the "Send emails through your SMTP server" page. This is where we get clever and, instead of entering the details of our own SMTP server (which used to work until Google changed requirements a while back) we're instead going to send through GMails own servers. In the 'SMTP Server' text box enter 'smtp.gmail.com' then in the 'Username' text box enter your GMail username (i.e. me@gmail.com). Finally, in the 'Password' box, enter the App Password we generated in the previous section. Once everything is entered the dialog should look similar to this:

SMTP Server Configuration

Click "Add Account >>" button which, if everything was entered correctly, should take you to the "Confirm verification and add your email address" screen. Here you are prompted for a confirmation code as shown below:

Verify Email Address

Leaving the dialog window open, return to your GMail inbox where you should have received an email from "Gmail Team" titled "Gmail Confirmation - Send Mail as [person]@[yourdomain.com]". In this email you should see a confirmation code which you can copy and paste into the "Confirm verification and add your email address" dialog window.

If you don't receive this email then you should double check your email forwarding rules to ensure the account your entered in the dialog above is configured to forward to your Gmail account. Also bear in mind that some domain registrars can take quite a while to forward email for new accounts (I've seen up to 24 hours previously) so, if you've confirmed that your settings are correct, you may simply need to be a little patient here.

Anyway, assuming your received the confirmation code email and pasted it into the "Enter and verify the confirmation code" text box, you should be able to click Verify, at which point the dialog will disappear. Congratulations, you're now able to send email using your domain email address!

Sending Email

Now, when composing a new email, you're able to click the "From" name and select the email address you want the recipient to see. Furthermore, when you receive email sent to the domain email address, GMail will automatically use this address as the "From" account when replying.

Enjoy!