【问题标题】:An error occurred while sending mail (SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol)发送邮件时出错(SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol)
【发布时间】:2013-04-15 13:16:12
【问题描述】:

configuration.yml

development:
   email_delivery:
     delivery_method: :smtp
     smtp_settings:
      #tls: true
       #enable_starttls_auto: true
       openssl_verify_mode: 'none'
       address: "domain name" 
       port: 25
       authentication: :login
       domain: 'mail domail name'
       user_name: 'mail id'
       password: 'pwd'

此代码用于发生以下错误

发送邮件时出错:

SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol


development:
email_delivery:
delivery_method: :smtp
smtp_settings:
tls: true
enable_starttls_auto: true
openssl_verify_mode: 'none'
address: "domain name" 
port: 587
authentication: :login
domain: 'mail domail name'
user_name: 'mail id'
password: 'pwd'

此代码用于发生以下错误

发送邮件时出错:

No connection could be made because the target machine actively refused it. - connect(2)


development:
email_delivery:
delivery_method: :async_smtp
smtp_settings:
tls: true
enable_starttls_auto: true
openssl_verify_mode: 'none'
address: "domain name" 
port: 25
authentication: :login
domain: 'mail domail name'
user_name: 'mail id'
password: 'pwd'

没有发生错误但仍然没有收到用户的邮件。

development:
email_delivery:
delivery_method: :smtp
smtp_settings:
tls: true
enable_starttls_auto: true
openssl_verify_mode: 'none'
address: "domain name" 
port: 25
authentication: :login
domain: 'mail domail name'
user_name: 'mail id'
password: 'pwd'

此代码使用 redmine 版本 2.2.3 可以正常使用。但现在使用的 2.3.0 版无法正常工作。

【问题讨论】:

  • 做一件小事太累了。尝试了所有可能的组合和建议的解决方案。有哪位高手可以帮我看看吗?我不想经历重新安装过程。

标签: ruby-on-rails redmine


【解决方案1】:

在与这个问题斗争了几个小时之后,这就是我想出的(对我有用)

email_delivery:
  delivery_method: smtp
  smtp_settings:
    openssl_verify_mode: none
    tls: false
    enable_starttls_auto: true
    address: smtp.xxx.xx
    port: 587
    domain: xxx.xx
    authentication: login
    user_name: "xxx@xxx.xx"
    password: xxx

确保地址与域匹配并且可以解析

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-08-21
    • 1970-01-01
    • 2014-11-06
    • 1970-01-01
    • 1970-01-01
    • 2017-06-03
    • 2011-03-31
    • 2013-06-26
    相关资源
    最近更新 更多