Report this

What is the reason for this report?

Email configuration: rails 4, gmail, godaddy

Posted on April 15, 2016

How to configure: rails 4, gmail, godaddy ? Im using this configuration for my own email/domain: contact@mydomain.com

  smtp:
    address: smtp.gmail.com
    port: 587
    domain: mydomain.com
    user_name: contact
    password: password
    authentication: plain
    enable_starttls_auto: true

I receive 2 kind of errors:

  1. *Net::SMTPAuthenticationError: 534-5.7.9 Please log in with your web browser and then try again. Learn more at
  2. eoferror-end-of-file-reached


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

It sounds like you are encountering a Google security feature based on the request that you log in with a web browser. Logging into your google account from a browser on your droplet looks like it would resolve that but since most people do not have a need for a graphical environment on their server and text based browsers can be finicky with newer technologies I would recommend setting up a free account somewhere like sendgrid that would allow you to set up SMTP access easily from your server using the method you already are, still use the sender/reply-to address you want and avoid the extra steps.

For the STMP error, Google prefers you to use OAuth for authenticating, otherwise you might get errors like this when connecting. You can try a few different things to get around this:

  1. Create an ‘app specific’ password for your account and use that in your configuration
  2. Enable the ‘use less secure apps’ setting on your gmail account, then you can use your normal password (this isn’t supported with two-factor authentication enabled on your account)

Hope this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.