jason duffett.

Gmail, custom domain name & "on behalf of..."

tech 1 min read

I use Gmail for all my different email addresses including some custom domain names.

One of the annoying things with the default setup is that it includes the “Sender” field in the message, for DomainKeys compatiblity, which some email clients (Outlook & Hotmail for starters) use to display the email as “From myemail@gmail.com on behalf of myemail@mycustomdomain.com”.

This just looks ugly.

The solution is to configure Gmail to use a different SMTP server (eg. from your ISP) to send emails from your custom domain, but not everyone has access to an SMTP server that supports this. For instance Sky’s SMTP server rewrites all messages as coming from your sky.com address.

There is a solution though. Use Gmail’s SMTP servers.

Open Gmail options and edit the account for your custom domain email address and set it up as follows:

Gmail options screenshot

One more thing… If you are using Google’s 2 Step Verification, then you will need to setup an application-specific password for the Gmail SMTP server and use that instead of your google password.