Sendgrid integration with Salesforce

Preparation

To get Salesforce to send emails using sendgrid, you’ll need to have the following in place:

  • If you don’t already have an account, create one at sendgrid.com
  • Be sure to follow the DNS configuration guidelines at sendgrid.com
  • Create an account for SMTPRelay

Getting started

Log in toSendGrid create credentials for Salesforce (you can use your own credentials, but it’s better to have separate usernames/passwords):

Go to SettingsCredentials and click Add New Credential.

sendgrid credentials menu

Enter a username and create a password. For the username, we’d recommend something like [email protected]. Select the MAIL checkbox. Click Create Credential.

sendgrid new credential

You have just created an SMTP login for SendGrid. We will be using these credentials to configure SMTPRelay.

Log in to SMTPRelay, and go to your services list:

Click Add a New Relay and enter the SendGrid smtp credentials. Enter your salesforce orgId. You can find the orgId by logging in to salesforce. Its under Setup, Company Profile, Company Information. It’s the 15-character code under Salesforce.com Organization ID.

salesforce orgid

After you click Save, e will automatically validate the authentication settings. If everything is ok, the control panel will show you how to configure Salesforce.

In Salesforce, go to SetupEmail Administration, Email Relay Activation. Enter the following:

salesforce relay settings

  • Email Host: relay.getsmtprelay.com
  • Port: 587
  • TLS Setting: “Preferred”
  • Uncheck “Restrict Relay To Domains”
  • Check Active

Click save.

You might notice a warning about using a relay in combination with bounce management. Sendgrid will take care of this. In Salesforce, go to SetupEmail Administration, Deliverabiliy. Uncheck the following options:

  • Uncheck “Activate bounce management”
  • Uncheck “Enable compliance with standard email security mechanisms”

Finally, click save.

You should now be able to send a test message from Salesforce. It should be delivered and show up in your SendGrid console. If it is not delivered to your mailbox, but does show up in SendGrid, please check your SendGrid and DNS configuration.

 

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Join our mailing list to receive the latest news, updates, tips and tricks about email deliverability in Salesforce.`

You have Successfully Subscribed!