Net::SMTPAuthenticationError when sending email from Rails app (on staging environment)

I had the same problem: emails were sent from development, but not from production (where I was getting Net::SMTPAuthenticationError).
This drove me to conclusion that the problem was not with my app’s configuration, but with Google.

Reason: Google was blocking access from unknown location (app in production)

Solution: Go to http://www.google.com/accounts/DisplayUnlockCaptcha and click continue (this will grant access for 10 minutes for registering new apps).
After this my app in production started sending emails 😉

Leave a Comment