haseeb haseeb - 4 months ago 114
Ruby Question

Email working properly on local but gives error on heroku

For email sending I use mailgun. On localhost everything works. But on heroku I get error

`Net::SMTPFatalError (554 Sandbox subdomains are for test purposes only. Please add your own domain or add the address to authorized recipients in domain settings.


How I resolve this?`

Answer

Go to https://mailgun.com/app/domains/ and pick your sandbox domain (something like app801blahblahblah.mailgun.org). Then, add the recipients of your e-mail to Authorized Recipients

enter image description here

Remember to use an e-mail address which can receive e-mails.

This is because mailgun would send a confirmation e-mail asking if the owner of the e-mail address really wants to receive e-mails from mailgun.

Comments