This project is archived and is in readonly mode.
SSL problem with SMTP in 2.2.2
Reported by rssaddict | November 28th, 2008 @ 03:49 PM | in 2.x
When I try to send mail using SMTP in Rails 2.2.2 I get the following error (full trace attached):
hostname was not match with the server certificate
When I set the RAILS_GEM_VERSION to 2.2.0 in environment.rb the mail sends without problem.
Here are my smtp_settings:
ActionMailer::Base.smtp_settings = { :address => 'mail.514design.com', :port => 26, :domain => '514design.com', :user_name => 'xxxxxxx@514design.com', :password => 'xxxxxxxx', :authentication => 'login' }
Comments and changes to this ticket
-
rssaddict November 28th, 2008 @ 03:51 PM
Also, this post on the Slicehost forums seems to relate to the same bug:
-
Dan Ryan November 29th, 2008 @ 03:44 AM
You'll see this error if your mailserver has an SSL certificate set up for a hostname other than the one to which you are trying to connect. I was experiencing the same error, until I changed my smtp_settings to reflect the hostname of the associated SSL cert.
-
Dan Ryan November 29th, 2008 @ 04:26 AM
Created a patch that adds an :ssl true/false option to the smtp_settings hash to toggle whether ssl is used. Defaults to true.
-
Michael Koziarski November 29th, 2008 @ 12:27 PM
Instead of == false, just use the unless !options[:ssl]
That'll let people set it to nil, and is a little more readable.
Also, there are no tests for this patch. You'd probably need to use mocha. Care to take a stab at those?
-
Dan Ryan November 29th, 2008 @ 01:50 PM
I like that idea much better. I'll write tests for it and upload those soon
-
CancelProfileIsBroken August 3rd, 2009 @ 02:28 PM
- State changed from new to resolved
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>