ruby-on-rails - ActionMailer 3.2.x OpenSSL::SSL::SSLError

标签 ruby-on-rails smtp

我将我的 Rails 应用程序用于 Rails 3.2.8,发现我的 SMTP 外发邮件不再能够通过我的邮件服务器进行身份验证。

进一步调查显示我的 ActionMailer 配置使用以下内容:

  config.action_mailer.smtp_settings = { address: 'mail.mydomain.us',
                                         port: 587,
                                         domain: 'mydomain.us',
                                         user_name: 'xxx@mydomain.us',
                                         password: 'yyy',
                                         authentication: 'login',
                                         openssl_verify_mode: 'none',
                                         enable_starttls_auto:  true,
                                         ssl: true }

我看到的具体错误信息是:

SSL_connect returned=1 errno=0 state=unknown state: unknown protocol

希望这对某人有帮助。

最佳答案

我也遇到了这个问题,我在 SendGrids 网站上找到了一些东西。

这是使用 tls 而不是 ssl 的推荐设置 http://sendgrid.com/docs/Integrate/Frameworks/rubyonrails.html

如果你想使用 SSL,你应该使用端口 465

以下是推荐的端口: http://sendgrid.com/docs/User_Guide/smtp_ports.html

关于ruby-on-rails - ActionMailer 3.2.x OpenSSL::SSL::SSLError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12279530/

相关文章:

java - "Sending the email to the following server failed : webmail.company.com:465"

python - 是否有任何选项可以使用 python 脚本检查电子邮件 ID 是否存在?

ruby-on-rails - rails 中不兼容的字符编码 - 如何明智地失败/跳过?

jquery - rails 4 : Adding child_index to dynamically added (nested) form fields with Cocoon Gem

iphone - 使用 SMTPSender/SKPSMTPMessage 发送电子邮件给出错误 -[NSConcreteMutableDataencodeBase64ForData] : unrecognized selector sent to instance 0x6a67190

python - 从 python 中的文本文件中发送最后一行

php - 服务器使用 gmail 发送电子邮件 smtp 获取警报

ruby-on-rails - 您如何限制对某个网页的访问?

ruby-on-rails - 如何确保 Heroku 上的多进程 Unicorn Rails 应用程序中方法的单次运行

ruby-on-rails - 根据 rails 3 中的范围计算版税