Domain setting for sendgrid smtp (rails)

The sendgrid docs say to use

:domain => 'yourdomain.com'

in the ActionMailer smtp settings. However! A whole bunch of tutorials for setting this up on heroku note that that the domain should be heroku.com. And indeed in our application we’ve been using that value for the past 8 years.

As I transition to Render I thought I’d check on this. Anyone know if the domain value should be my domain, or render.com or blahblah.onrender.com ?

Hi there,

Hmmm. Looking at the ActionMailer docs domain has the following:

:domain - If you need to specify a HELO domain, you can do it here.

The SendGrid docs as you’ve found (https://docs.sendgrid.com/for-developers/sending-email/rubyonrails#configure-actionmailer-to-use-sendgrid) show:

  :domain => 'yourdomain.com',

Personally, I’d go with whatever domain I’m sending emails for - although I’d imagine that there’s a chance that Sendgrid don’t actually do anything with this value anyway

John B

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.