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 "[email protected] On Behalf Of [email protected]", which is a bit messy. How do I get rid of this?
4 Answers
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!
- Google Workspace Admin -> Apps -> Google Workspace -> Gmail -> End user access -> Enable
Allow per-user outbound gateways
in Domain admin. - 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: [email protected] (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!)
-
-
2Doesn't work, the parent domain is still visible in the email headers:
Return Path
,Recieved-SPF
andAuthentication-Results
all have parent domain details in it.– ShevekCommented Jul 2, 2010 at 7:02 -
3Answering your own question is totally fine! Thanks for sharing. Commented Nov 30, 2011 at 10:17
-
1It 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. Commented Jul 24, 2013 at 14:05
-
1If you are usign G Suite you need to turn on this setting in Domain admin first
Allow users to send mail through an external SMTP server when configuring a "from" address hosted outside your email domain
Commented Feb 12, 2020 at 20:21
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.
-
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 :)– x3jaCommented Jun 30, 2010 at 21:22
-
1The only thing you can do currently is change the "reply to" address, in regards to a gmail address, in 2021.– PieCommented May 20, 2021 at 2:15
Here's my writeup on why the accepted answer both works and doesn't:
http://www.stavros.io/posts/how-properly-configure-google-apps-email/
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.
-
Doesn't work I'm afraid. Even with SPF, DKIM and DomainKeys configured you still get "on behalf of". The only solution that worked for me was setting up Gmail to use itself as an external SMTP server.– RichardCommented May 24, 2018 at 11:34
What Stavros suggested vastly improves the reliable delivery of our emails to any outside domains and will cause it to not go to spam.
However to finally clinch it, I turned ON an important option of "Allow Per User External Gateways" in Gsuite Admin found under "https://admin.google.com/ac/apps/gmail/ enduseraccess"
What this does is under the Email that we add, after Clicking Next Step, instead of just refreshing it as a Saved option, it takes to a next screen of providing the SMTP server login details of the outbound domain and there you can again give the userid@aliasdomain name and password.
This finally ensured that the mails always go out as user@aliasdomain without the receiving outlook clients showing On Behalf of or Via.
I guess the steps Stavros advised are also needed at the DNS level but he may have assumed that this step is already turned on and despite giving SMTP details the On Behalf shows up.
So what is missing in your case could be the enabling of "Allow Per User External Gateways"
-
I have "Allow per-user outbound gateways" enabled but have the same issue. When I attempt to add the secondary address, it does not prompt for SMTP credentials unless it is a non-Gmail/Google Workspace account. Commented Jul 18, 2023 at 16:12