Mikel's mail gem with Gmail

I am using rails 2.3.4 and ruby 1.8.7

Setting up the SMTP via Gmail but failed: ActionMailer::Base.smtp_settings = {   :address => "smtp.gmail.com",   :port => 587,   :authentication => :plain,   :enable_starttls_auto => true,   :user_name => "noreply@gmail_or_your_google_domain.com",   :password => "chucknorris" }

Got: Must issue a STARTTLS command (seems that many ppl said with the enable_starttls_auto setting, I shouldn't see this error).

Then I tried to use Mikel's mail: http://github.com/mikel/mail

I got execution expired timeout error on my deliver.

My question is whether Mikel's gem will use the ActionMailer::Base.smtp_settings? and How should I set up the SMTP via Gmail?

Thanks! Arthur

I just got this working without any problems, using XP and instant rails.

Dumb question, you did change the username and password, right?

Changpeng Zhao

Yup,

I've changed the password and username.

That setting is from a tutorial on setting up Gmail and SMTP in rails.

Btw, I am using Ubuntu.

Thanks, Arthur

Try this:

config.action_mailer.smtp_settings = { :enable_starttls_auto => true, :address => “smtp.gmail.com”, :port => “587”, :authentication => :plain, :user_name => “noreply@gmail_or_your_google_domain.com”, :password => “chucknorris” }

Hi Guys,

I can send email via GMail SMTP using Mikel's gem now.

The setting is setting Mail's default smtp and passing the user, pass and enable_tls. Then it works!

Thanks! Arthur