Just a note that might anyone who's been in my situation.

If you are using gmail and want to send through smtp, you need the
following in your config/environment.rb:

ActionMailer::Base.smtp_settings = {
            :enable_starttls_auto => true,
            :address => "smtp.gmail.com",
            # The email still gets sent without this
            :domain => "yourdomain.tld",
            :user_name => "n...@gmail.com",
            :password => "your_gmail_pass",
            :authentication => :plain,
            :tls => true,
            :port => 587

Side note, sending emails was failing silently.

I had to comment out the last bit of Mailer#send (which rescues
errors) so I could see on my log what was happening.

The rescue part adds the error.message to a hash but I didn't find how
to access this hash. Is this a bug or am I missing something?

Reply via email to