user1595702
user1595702

Reputation: 301

ActionMailer and Gmails setup Rails 3.0.1/3.1.0

I've been trying to set up ActionMailer with my rails app without success. I have searched several different threads without finding a solution. Is there a gem of some sort that I need to install to prevent my issue?

Here is the issue:

https://gist.github.com/3341261

==Solution==

So my solution was to go to use tlsmail gem. I followed this thread and the second answer there helped me solve my issue.

gmail smtp with rails 3

There is a gotcha when it comes to unicorn. I was using an init.d file to restart my server, however I had to actually stop the server then remove the pid file manually for unicorn. After starting unicorn it worked.

Upvotes: 0

Views: 188

Answers (3)

user1595702
user1595702

Reputation: 301

So my solution was to go to use tlsmail gem. I followed this thread and the second answer there helped me solve my issue.

gmail smtp with rails 3

There is a gotcha when it comes to unicorn. I was using an init.d file to restart my server, however I had to actually stop the server then remove the pid file manually for unicorn. After starting unicorn it worked.

Upvotes: 0

Damon Aw
Damon Aw

Reputation: 4792

The below is one of my settings that worked. Hope it might help you spot something awry. =)

config.action_mailer.delivery_method = :smtp

config.action_mailer.smtp_settings = {
        :address              => "smtp.gmail.com",
        :port                 => 587,
        :domain               => 'mobileme.com',
        :user_name            => '[email protected]',
        :password             => 'Z!DDq%a!OsfGCsdsd2mEc',
        :authentication       => 'plain',
        :enable_starttls_auto => true  
    }

Of course the I change the domain and password.

Upvotes: 1

Amar
Amar

Reputation: 6942

Try :enable_starttls_auto => true option in action mailer configuration

Upvotes: 0

Related Questions