(parenthèse.be)

Aller au contenu | Aller au menu | Aller à la recherche

Développement Web

Fil des billets - Fil des commentaires

lundi 4 janvier 2010

Ruby on Rails ActionMailer Error : OpenSSL::SSL::SSLError (hostname was not match with the server certificate)

Here's the error i got today, while testing my application online :

OpenSSL::SSL::SSLError (hostname was not match with the server certificate)

A way to fix this issue is to set enable_starttls_auto to false. Therefore i use a before_filter in my ApplicationController

class ApplicationController < ActionController::Base
  before_filter :set_mailer_options

  protected

  def set_mailer_options
    ActionMailer::Base.smtp_settings = {
      :enable_starttls_auto => false,
      :domain => "yourhost.com"
    }
  end
end

That's it, ActionMailer will never ever try to connect to your mail server with TLS again.

mercredi 11 novembre 2009

Extreme JavaScript Performance

Extreme JavaScript Performance

View more documents from Thomas Fuchs.