How to Setup Email Relay in Salesforce - Learn Here
In this blog, we got to know How to setup Email Relay in Salesforce.
Reviewing the Current Setup of our Salesforce ORG
- Login in your Salesforce org.
- Open the record from which you want to send the email.
- Click the Activity tab and then click Email.
- Send an email to your desired mail id.
- Open your mail and check. (If you did not receive it at your primary, then check your spam box.)
- After opening that email, you will notice a random string generated by the salesforce itself at the sender’s address.
- This only tells us that right now our emails have been sent from the Salesforce SMTP.
How to Setup Email Relay Through Salesforce and Using Gmail Server?
(I) Setup of G-suite ADMIN
- First of all, we have to login into our G-suite admin https://admin.google.com/
- In the search bar we need to type SMTP Relay and click on SMTP relay service.
- On Hovering the mouse on SMTP relay, it will pop up the configure button, click on the button.
- You will see the form, Specify the name of the SMTP relay service.
- At allowed senders you can give three types of permission i.e.
- Only Registered App users in my domains- The sender must be a registered user in one of your domains.
- Only Addresses in my domain-The sender doesn’t have to be recognized as a G suite user, but must be in one of your registered domains. This can be useful when you have a third party or custom application that needs to send messages.
- Any Addresses (not recommended)- The sender addresses can be anything, even outside of your domain.
- We will be choosing the only address in my domain as the Salesforce send IP ranges to accept our SMTP server.
- Click on ‘Add IP Range’ here we have to add all the IP range one by one, to get your own range of IP address please refer to this Document Salesforce IP Addresses and Domains to Allow and click save.
- Leave SMTP authentication unchecked in this case Google enforces the uses of SMTP authentication to identify the sending domain.
- Check the box ‘Require TLS encryption’ for communication between your server and google ‘s server it encrypts even your message.
- Click save.
Don't forget to check out: Send Rich Text Emails Using Salesforce Flow
(II) Setup of Configure Email Relay in Salesforce
- Login into Salesforce ORG, navigate to email relay in quick find click on the button.
- Click create email relay.
- For Gmail, Specify host as smtp-relay.gmail.com port as 587 and TLS setting as Required Verify, Click save.
- Search for email domain in the quick find box and click email domain filter, Click create email domain filter choose the Relay server as above.
- Smtp-relay.gmail.com and check the active box.
- Go to Test Email Deliverability and send the mail to whom you want to send and click send.
- It will automatically trigger 16 test messages from different IP addresses.
- Check your mail you will have received 16 emails in your inbox.
(III) Final Test
Login your Salesforce ORG, navigate to any record and compose your email again you will see no string from salesforce.
To Setup SMTP relay in outlook 365
(a) Setup of Microsoft 365 admin
First of all we have to go to Microsoft 365 admin center for our SMTP configuration.
Select Show all then, Exchange then, mail flow.
Click + sign Fill the Credentials according to the SMTP relay.
Check the sender’s IP address and click next.
Fill in all the IP addresses given by Salesforce.
Than click save.
(b) Setup of Configure Email Relay in Salesforce
1.Login into Salesforce ORG, navigate to email relay in quick find click on the button.
2.Click create email relay.
3.For Gmail, Specify host as smtp-relay.outlook.com port as 25 and TLS setting as Required, Verify,, Click save.
4.Search for email domain in the quick find box and click email domain filter, Click create email domain filter choose the Relay server as above.
5.Smtp-relay.outlook.com and check the active box.
6.Go to Test Email Deliverability and send the mail to whom you want to send and click send.
7.It will automatically trigger 16 test messages from different Ip addresses.
8.Check your mail you will have received 16 emails in your inbox.
Check out another amazing blog by Shreya here: Salesforce Org Migration to Hyperforce
(IV) Step by step email relay connection of outlook to Salesforce
- Open Microsoft Admin center https://admin.microsoft.com/
- Enter you login Id and User Password
- Click on the and select show all
- And at Admin center click Exchange
- In the left menu click Mail flow
- At the top menu you will see connectors
- . Click on the + as given in Screen Shot from Partner org to Office 365
- Click Next Give connector name and check the checkbox
- Click next check the Use the sender’s IP address
- Specify the sender IP address Range click on + sign add all the ip address range of your own region
- click next and check the check box reject email messages if there aren't over TLS
- Review all and click sav