Salesforce Email Relay Explained: Why It Can’t Log In to Your Mail Server
Salesforce's Email Relay setting lets you hand outgoing email to a mail server of your choice, but it cannot log in to that server. Most mail servers refuse to relay for a client that does not authenticate. SMTP Relay is the piece in between that does the authentication.
What Email Relay does
Under Setup, Email Administration, Email Relay Activation, you can enter a mail server hostname and port and choose a TLS setting. From then on Salesforce no longer delivers your email itself. It connects to that server and hands the message over, and the server delivers it.
The limitation
There is no field for a username and password. Salesforce expects the server to accept email from its IP ranges without a login. Mail providers such as SendGrid, Mailgun and Office365 do not work that way: they require every client to authenticate. Your own mail server could be configured to trust the Salesforce IP ranges, but that means running an open relay for those addresses and keeping the list current, which few organisations want to take on.
How SMTP Relay fills the gap
SMTP Relay accepts email from the Salesforce IP ranges and from nowhere else. When a message arrives, it reads your Salesforce organization ID, looks up the mail server and credentials you configured, and forwards the message to that server over an encrypted connection with your login. To Salesforce it looks like a relay that needs no password; to your mail server it looks like a normal authenticated client.
Because the email is delivered by your own server, it carries your server's reputation and no “via Salesforce” label, and it lands in the inbox more reliably.
Setting it up
Configuration is two steps: register your mail server credentials and Salesforce organization ID in SMTP Relay, then point Email Relay Activation in Salesforce at relay.getsmtprelay.com on port 587. No installation in your org is needed. The guides walk through it for each mail server:
- Integrate SendGrid with Salesforce
- Integrate Mailgun with Salesforce
- Integrate Office365 with Salesforce
- Integrate any SMTP server with Salesforce
What stays the same
Every message still starts in Salesforce, so your templates, email tracking and daily sending limits work exactly as before. SMTP Relay changes only who delivers the email, not how much of it Salesforce lets you send.