Posts Resume My Philosophy Who Am I

Email causing SocketError on Heroku?

h1. Email causing SocketError on Heroku? p(meta). 06 May 2010 - Laurel, MD Getting a SocketError while sending emails on heroku, using sendgrid? It may be some gmail env vars. While working on a project that I just inherited, we enabled sendgrid for our heroku app. Sending an email raised this error: h2. SocketError (getaddrinfo: Name or service not known) Google searches indicated ActiveMailer configuration issues, but Heroku was pretty clear:
Rails apps using ActionMailer will just work, no setup is needed after the addon is installed.
While ensuring that RACK_ENV was set correctly (when all else fails), I found these two settings:
GMAIL_SMTP_PASSWORD         => #blahblah#
GMAIL_SMTP_USER             => admin@xyz.com
Removing them fixed my email. Sendgrid is working fine. Armed with this evidence, I found "tech_sending_email_with_gmail":http://blog.heroku.com/archives/2009/11/9/tech_sending_email_with_gmail/ And so... someone had set up the server for gmail, but something about it was failing now. Now I know. And you do too. Note: this is just *one* cause of this error.