In this post we’ll take a look at sending emails while in Salesforce, but having the email come from your own email server!
There may be a few reasons you would want to do this.
First, if your Salesforce users don’t send a ton of mass emails out of Salesforce then email relay could be a good fit. You wouldn’t be risking the reputation of your corporate email server or overwhelming it with large sending volume.
Second, when you go to the sent folder in your email client or search your inbox for emails sent emails sent from Salesforce will be there! If you had the Salesforce email server sending the email you would only have this visibility in Salesforce. This may or may not be a concern. If you’re using the Lightning for Outlook/Gmail plugin you can simply search Salesforce from your inbox and see the email history there, and this becomes a mute point. But if you aren’t using Lightning for Outlook/Gmail then it could be tedious to track down the original email communication, and you would have to context switch to Salesforce (if the respondent didn’t quote your original email message in their response).
Finally, setting up email relay just gives your users an overall more seamless user experience. They know when they send an email from Salesforce it’s going to be delivered. You don’t have to worry about whether IT has properly configured SPF and DKIM for Salesforce. After all it’s your email server, not Salesforce’s sending the email.
Setup in Salesforce
There are two ways to setup email relay in Salesforce. This post covers how to setup email relay using the Email Relays node in setup menu of Salesforce. There is another easy way to enable it if you have Office 365 or Gmail that you can learn more about on Trailhead here. For companies not using Gmail or Office 365, or if you want to get more advanced with email relay than the “all-or-nothing approach” the Office 365 feature offers read on…
1. Navigate to the Setup menu in Salesforce and type Email Relays in the quick find. Click Create Email Relay.
2. For host enter the host of your relay. For gmail this is smtp-relay.gmail.com. For SendGrid it is smtp.sendgrid.net.
3. Set the port. For unencrypted or TLS connections most email relays use port 587. For SSL most email relays use port 465.
4. If you require authorization on your email server to setup relay, check that box and enter your credentials. We won’t do this in our example.
5. Click save. Next, navigation to Email Domain Filter in the quick find in the setup menu.
6. Click Create Email Domain Filter.
TIP! Here is where you’ll decide under what circumstances that you want to send emails via relay. Of course, you can setup multiple relays. You may have one process that sends a transactional email, and you’ll want to use your SendGrid email server in that situation. While in another business process you may want email to be sent by your corporate server, and another from your order management system. You can control this by choosing entering your domain/subdomain for that process in the sender domain area (ex. orders.paulbfischer.com).
7. Complete the configuration of the sender domain and recipient domain, if needed. In the email relay area select the email relay that you created in the steps above.
8. Check the active box and click save.
Let’s Test It Out!
First, let’s send the email out of Salesforce.
Now, let’s check out the sent folder in Gmail.
We’ve successfully configured email relay in Salesforce!