I just fired up a Rails app I was building back in January which would send emails via Gmail's smtp protocol. Today I get a Net::SMTPAuthenticationError with 530-5.5.1 Authentication Required. I googled this and tried all the suggestions like re-logging into Gmail, unlocking Captcha, and changing my password. None of these worked.
Here's my development.rb code:
config.action_mailer.default_url_options = { host: "localhost:3000" }
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.smtp_settings = {
address: "smtp.gmail.com",
port: 587,
authentication: "plain",
enable_starttls_auto: true,
user_name: ENV["GMAIL_USERNAME"],
password: ENV["GMAIL_PASSWORD"]
}
UPDATE
well this is strange. I changed my server to smtp.yahoo.com and I'm getting the same Rails error.
UPDATE 2 I also got a new ISP since the last time I tried this app. Could that be a problem?