Action Mailer Smtp Google Apps

Action mailer SMTP google apps

It works now, I think the problem was with the username. it needs the domain in the username. i.e. the problem was

user_name: 'username'

Whereas the correct way (at least for google apps) is

user_name : 'username@mydomain.com'

ActionMailer - Sending email with Google Apps doesn't work, but works with free Gmail account

We had a similar issue. Try setting the domain to gmail.com, like this:

config.action_mailer.smtp_settings = {
address: "smtp.gmail.com",
port: 587,
domain: "gmail.com",
user_name: "admin@devsup.com.br",
password: "password",
enable_starttls_auto: true,
authentication: "plain"
}

EDIT:
Or try to make sure to remove the typo in the domain. There is an extra single quote in your domain right now.

Rails 4 mailers with gmail smtp

Gmail smtp service need an APP PASSWORD for send a mail from a gmail account (for more info visit this link). After generating the password you must change the configuration of the development file:

  config.action_mailer.perform_deliveries = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:domain => "gmail.com",
:user_name => "mymail@gmail.com",
:password => "GENERATEDPASSWORD",
:authentication => :plain,
:enable_starttls_auto => true
}

And then restart the server.
For catching the error i've set: config.action_mailer.raise_delivery_errors = true (Thanks Dipak for the tip)



Related Topics



Leave a reply



Submit