Running into SMTP error when trying to send email in RoR app Running into SMTP error when trying to send email in RoR app ruby ruby

Running into SMTP error when trying to send email in RoR app


The reason that you are seeing this error is that Google has blocked your IP. You will need to enable authorization for this IP.

Go to http://www.google.com/accounts/DisplayUnlockCaptcha and click continue.

Then again try to send email from the application, it should work. You will need to send email from your app within 10 min of visiting the above link. By visiting above link, Google will grant access to register new apps for 10 min.


I solved by doing the following:

1) Log into the Google Apps Admin portal and enable Less Secure Apps by checking "Allow users to manage their access to less secure apps" under Security preferences.

2) Login into the account that will serve as the mailer and turn "Allow less secure apps" to ON.

Most of the answers available on-line refer to step 2, but you cannot configure at a user level without the Admin turning the feature on.


This one solved the issue for me after some investigation:

Click https://www.google.com/settings/u/0/security/lesssecureapps

Enable access for less secure apps here by logging in with the email address you have provided in smtp configuration.