我正在写一个红宝石脚本来使用'邮件'宝石发送电子邮件。无法通过smtp通过SSL发送电子邮件
和我的本地机器上我的SMTP设置:
mailer_options:
address: smtp.gmail.com
port: 587
domain: gmail.com
user_name: [email protected]
password: example_password
authentication: :login
enable_starttls_auto: true
ssl: true
当我尝试上述SMTP设置我得到下面的异常发送电子邮件:---
/opt/rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/net/smtp.rb:585:in 'connect': SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol (OpenSSL::SSL::SSLError)
我试图通过命令安装SSL证书
openssl s_client -connect gmail.com:443
但它没有帮助,感谢您的任何意见和答案。
我解决了这个问题,以465 –
那会做到这一点,'enable_starttls_auto'只是额外的,因为smtp服务器已经加密,因此不应该提供。 – Doon