
In simple terms “Email Relay” means that any email that needs to go out from your Salesforce Org will be sent through your company’s email (SMTP) Server and not through Salesforce SMTP Servers.
There are different scenarios under which emails can be sent out from a Salesforce Org. For example
- User can send emails from Salesforce by navigating to a lead, contact or case record and use the ‘Email’ functionality to send emails manually
- Admins can configure the org to send emails automatically through workflow rules, process builder or flows based on certain events like creation/closure of a case
- Developers can send emails through Apex
- Users can subscribe to emails for Chatter groups and posts
- Salesforce itself can send system emails. For example for password resets, when a sandbox is ready, when sharing rules are recalulated, when weekly data export file ready and so on
Normally Salesforce uses it’s own SMTP servers to send email. But many organizations may want the mails to be routed through their email server rather than using Salesforce servers. Now this may be because of compliance & security reasons or they may not want the recipient’s email server to treat these emails as spoofing forgery
You can route all emails sent from Salesforce through your organization’s email (SMTP) server by configuring a feature called Email Relay. Configuring Email Relay is actually very simple, but if you run into issues it can easily consume a couple of days.
With this blog post and the step-by-step guide, I have tried to make the whole process of setting up Email Relay very clear and prescriptive. I have also added some troubleshooting tips towards the end so that if you do run into issues, at least you will know where to look for the problem. Check it out and …. happy relaying
(Though this guide configures email relay in Salesforce with G Suite, you should be able to follow these steps to configure it with with any other email server)
References:
- Send Email from Salesforce – Help Article (5 Mts) – https://help.salesforce.com/articleView?id=emailadmin_send_email_from_salesforce_overview.htm&type=5
- Send Email Through Email Relay – Help Article (5 Mts) – https://help.salesforce.com/articleView?id=emailadmin_email_relay_overview.htm&type=5
- Considerations for Setting Up Email Relay – Help Article (10 Mts) – https://help.salesforce.com/articleView?id=emailadmin_email_relay_considerations.htm&type=5
- Set Up Email Relay – Help Article (10 Mts) – https://help.salesforce.com/articleView?id=email_relay.htm&type=5
- Setup eMail Relay To Automatically Route eMail Through SMTP – Video (4:19 mins) – https://youtu.be/GVEe-zMrslw
February 10, 2021 @ 6:42 PM
Great read, Ashish. Is there an SMTP of salesforce that we can use as a relay?
February 11, 2021 @ 7:07 AM
Hi Aditya, by default (that is if you don’t setup email relay), all the emails go through Salesforce’s SMTP server only.
July 22, 2020 @ 1:43 PM
Hi Ashish, the step-by-step is very simple and easy to follow. I followed the steps and successfully setup the email relay from SF to our G Suite. The weired “via” strings following Sender’s email is gone. Thank you.
However, every email we sent out from SF also shows up in the Inbox of the sender’s Gmail. Any idea why and how can we turn this off?
July 23, 2020 @ 1:34 PM
Hi Olivia, thanks for your feedback. Emails sent out from Salesforce through email relay will appear in the ‘Sent’ items in GMail. It should not appear in Inbox. Can you email me the screenshot of the Gmail inbox and also of the email header in Gmail where it shows the from, to, cc, date and subject fields and I will take a look. Just be sure to blur the fields that are sensitive. You can email these to me at ‘ashish@asagarwal.com’.
July 26, 2020 @ 6:52 PM
Hi Ashish, I am looking at the email log from SF. It seems every email sent out from SF, a email is also sent to the sender’s email at the same time. Any idea where in SF may have a setting that cause this to happen?
July 28, 2020 @ 10:07 AM
Hi Olivia, you can check if the ‘Compliance BCC Email’ is set under Setup. This is at the org level. There is also an option for ‘Automatic Bcc’ under User’s Settings -> Email -> My Email Settings.
July 29, 2020 @ 2:46 PM
Found it. It’s the “Compliance BCC Email”. Thanks Ashish.
July 29, 2020 @ 4:50 PM
Great. My pleasure Olivia.
June 20, 2020 @ 2:45 AM
I have followed these instructions but when I test deliverability I don’t get any emails. I am using G Suite Nonprofit. When I download the email log, some of the email have this error message: “454 4.4.4 [internal] no MX or A for domain”. Others have no error message.
July 2, 2020 @ 5:43 AM
Emily was able to resolve the problem by contacting Google support. She made 2 changes that made it work. These changes were enabling SMTP authentication in Email Relay setting in Salesforce and enabling less secure apps in GSuite. Posting this update here for other readers’ benefit, in case they are running into the same issue.