sendmail:OpenSSL :: SSL :: SSLError:hostname不匹配

Luc*_*oli 5 openssl sendmail ruby-on-rails actionmailer ruby-on-rails-3

我有一个与ubuntu 10.04的vps.我想安装一个rails 3应用程序如果我尝试从终端测试sendmail命令它的工作原理.

在我的应用程序中,对于邮件,我已插入application.rb文件:

config.action_mailer.delivery_method = :sendmail
    config.action_mailer.sendmail_settings = {
        :location       => '/usr/sbin/sendmail',
        :arguments      => '-i -t'
    } 
Run Code Online (Sandbox Code Playgroud)

但如果我尝试发送带有rails的电子邮件,我会收到此错误:

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'
Run Code Online (Sandbox Code Playgroud)

我能怎么做?

谢谢