I have a vps with ubuntu 10.04. i'm tring to install a rails 3 application If i try to test the sendmail command from terminal it works.
In my application,for the mail, i have inserted in application.rb file:
config.action_mailer.delivery_method = :sendmail
config.action_mailer.sendmail_settings = {
:location => '/usr/sbin/sendmail',
:arguments => '-i -t'
}
But if i try to send an email with rails i receive this error:
OpenSSL::SSL::SSLError: hostname was not match with the server certificate
from /opt/ruby/lib/ruby/1.8/openssl/ssl-internal.rb:123:in `post_connection_check'
How can i do?
thanks
Maybe you need
:openssl_verify_mode => 'none'
per Rails 3 actionmail OpenSSL::SSL::SSLError
just add to your enviroment.rb
module OpenSSL
module SSL
remove_const :VERIFY_PEER
end
end
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With