Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Google Apps account with 1 primary domain and a secondary alias domain (let's say example.co.uk and example.com). When I send emails from the alias domain, the receiving person sees the sender as "alex@example.co.uk On Behalf Of alex@example.com", which is a bit messy. How do I get rid of this?

share|improve this question
up vote 32 down vote accepted

To do this, you need to set up Gmail to send emails via an "external" mail server. However, since the alias domain is already registered with Google, you can in fact set this "external" server to their servers and have it work just fine!

  • Gmail -> Settings -> Accounts -> Edit Info (on alias account) -> Next Step -> Send through example.com SMTP servers (recommended for professional domains)...
  • SMTP Sever: smtp.gmail.com, Port 465
  • Username: alex@example.co.uk (Note: not the alias domain login, but your main Gmail login)
  • Password: (Password for the above account)
  • Select Always use a secure connections (SSL) when sending mail.

If you don't have this other domain added as an alias and are just sending from an additional email address you'll have to send via the email servers of this other domain.

(Yes, I know I answered my own question, but it took me an age to figure this out, so I wanted to share it!)

share|improve this answer
Yup, that's how I do it. – Maxim Zaslavsky Jun 30 '10 at 21:55
Doesn't work, the parent domain is still visible in the email headers: Return Path, Recieved-SPF and Authentication-Results all have parent domain details in it. – Shevek Jul 2 '10 at 7:02
Do you still get the On Behalf Of message then? If so, is the parent domain registered as an alias with Google Apps? – x3ja Jul 3 '10 at 7:48
Answering your own question is totally fine! Thanks for sharing. – Tim Büthe Nov 30 '11 at 10:17
It looks like Google have got it wrong. Once I set the SPF field properly for my domain, the "via" field started appearing. I would imagine this would be the other way around. – Stavros Korokithakis Jul 24 '13 at 14:05

You can use gmail's send-through feature. Under settings -> accounts and import, edit the email address in question, and when prompted, choose to "send email through example.com SMTP servers". After configuring the SMTP server settings, you should be good to go.

share|improve this answer
Because this was an alias domain (configured to have Google as its mail servers), there were no external mail servers. It took me a while to figure out that I could just set the servers to Google's ones... see my answer below :) – x3ja Jun 30 '10 at 21:22

Here's my writeup on why the accepted answer both works and doesn't:


Basically, you need to set both the SPF and DKIM fields for "via" to go away. There's a bug that removes "via" if you have neither set, but that's just a bug, and you really should set both for deliverability anyway. That should allow you to properly remove the "on behalf of" display in Gmail.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.