Send mail from your domain using Gmail

Sometimes you want to give someone a forwarding email address to a domain but not have the burden or cost associated with a full blown inbox. This could be done for example for people who get involved in a community or an association and need to communicate as that role for a while before handing it over to the next person.

Just forwarding email is easily done by using just about any web hotel. But that doesn’t in itself solve the fact that email sent by those people will come from their personal address. A slightly better alternative is to add a reply-to address in the email client. However, that is not ideal either as the email will still come from their personal address, although in this case any replies will be from the forwarded domain.

What we want is to allow users to send email as if they had a proper inbox but still receive those email in their normal inbox. This is perfectly doable and I will give you a step by step process of how to set it up using Gmail.

First things first, you do need to have a Gmail address. If you don’t already have one go ahead and register for one. It is free. Also, this process assumes that you are using the two factor authentication support in Gmail. To set up two-factor authentication if you haven’t already done so, follow the instructions here: https://www.google.com/landing/2step/

When you have a Gmail account configured for two-factor authentication you can proceed with the configuration:

  1. Go to https://myaccount.google.com/apppasswords
  2. Choose “Mail” in the the dropdown for “select app”
  3. Choose “Other” in the dropdown for “select device”)
  4. When prompted for a name, just write any name that will help you remember its use, for instance the domain for which you are setting up email
  5. Press “Create”, on the next page and copy the password that is shown (you will need it later)
  6. Go to your gmail account (https://gmail.com)
  7. Under the settings > “Accounts and import” > “Send e-mail as” select “Add another email address”
  8. In the window that is shown type your name and email address that you want to send email as (i.e. not your Gmail address). Make sure to leave the checkbox “Treat as an alias” unchecked. Then click “Next step”
  9. Enter smtp.gmail.com as SMTP server with the port set to 587.
  10. When asked for a username, use whatever you have before @gmail.com in your Gmail account address with the password being the password from step 5 above. Choose to secure the connection using TLS. Then click “Add account”
  11. Keep the web browser tab open and open your mail client and wait for a verification email. This will be sent to the email address you are setting up Gmail to be able to send email as.
  12. You will receive a verification code that you will need on the previous web page, this concludes the configuration.

You have now configured Gmail to be able to send email with the specified name and email address. When writing a new email you can choose which originating address to use. By default each new email will use your normal Gmail address as sender address but this can be changed in the Gmail settings.

Finally, while this works it may not allow your recipients to receive emails sent via Gmail if the domain you are using employs an anti-spam feature called SPF. SPF allows a domain owner to specify valid sources of emails from that domain. If the recipients’ email servers uses SPF it will check if the email comes from a valid server, and if not it will be flagged as spam. To solve this the domain information needs to have the following setting added (the exact format can differ based on the existing SPF information):


v=spf1 include:_spf.google.com ~all