Forum: Ruby on Rails ActionMailer: hostname was not match with the server certificate

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ca0b18ec9e11dc777b2b8084fe5d5f90?d=identicon&s=25 Sam Kong (ssk)
on 2011-02-18 18:42
Hi,

I am setting up SMTP for my Rails 3 App.

This configuration works.

ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
  :address              => "smtp.gmail.com",
  :port                 => 587,
  :domain               => "mydomain.com",
  :user_name            => "<username>",
  :password             => "<password>",
  :authentication       => "plain",
  :enable_starttls_auto => true
}
But this configuration doesn't. It gives "hostname was not match with
the server certificate"

ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
  :address              => "some_other_server.com",
  :port                 => 587,
  :domain               => "mydomain.com",
  :user_name            => "<username>",
  :password             => "<password>",
  :authentication       => "plain",
  :enable_starttls_auto => true
}
Strangely, the same configuration works in Rails 2.3.8. (:tls => true)

What's wrong?

Thanks.

Sam
This topic is locked and can not be replied to.