views:

526

answers:

2

Hi,

I installed action_mailer_optional_tls for Rails 2.3.2 and Ruby 1.8.6 and I cannot get ActionMailer to send email!

I get the following error:

530 5.7.0 Must issue a STARTTLS command first

Sadness...anyone had success?

A: 

What is in your environment.rb file to configure the tls settings? This is what I'm using:

config.action_mailer.smtp_settings = { 
  :tls => true,
  :address => "smtp.gmail.com",
  :port => "587",
  :domain => "mydomain.com", 
  :user_name => "[email protected]", 
  :password => "mypassword", 
  :authentication => :login
}

I've had no problems using that gem in my application running under rails 2.3.2

Kyle Boon
+1  A: 

I have a similar problem with Rails 2.3.2 and Ruby 1.8.6. The new version of Rails uses part of Ruby 1.8.7 for TLS support. I found out more at this blog post. Basically if you have Ruby 1.8.6 you will need to install and configure the ActionMailerTLS gem, you can find it on github. My problems cleared up once I did that.

ScottD