Redmine邮件配置报错502解决方法(Reason: Error reading from remote server另一种原因)

本文介绍了在配置Redmine邮件时遇到502错误的问题,通过修改configuration.yml文件,启用TLS和正确设置SMTP参数,成功解决了Error reading from remote server的错误。详细步骤包括将tls设为true,更新address、domain、authentication等信息。

很久很久以前,稀里糊涂配置成功,很久很久以后配置还是不会,然后百度到csdn看看各家文字,然后还是不成功,提示如下:

Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request POST /redmine/admin/test_email.

Reason: Error reading from remote server

 

故事开始的前提是这样的:从前有一个又懒又笨的人,不得不搞个吹牛的系统来显示自己的勤劳和智慧,于是,找到了Windows一键安装版Redmine-3.4.6-1来显摆(安装包下载地址https://bitnami.com/stack/redmine/installer),然后改头换面,然后就到配置邮箱了,配置不出来,找资料然后找到需要配置的文件configuration.yml(我的路径D:\redmine-3.4.6-1\apps\redmine\htdocs\config),由于本人有自知之明(先飞也飞不动),所以先把这个在配置里已经配置过的,也么有成功配置邮件的文件备份了一下。然后改动文件,改成如下就能成功扑棱了:

default:
  # Outgoing emails configuration
  # See the examples below and the Rails guide for more configuration options:
  # http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      tls: true
      #false
      address: "smtp.exmail.qq.com"
      port: 465
      domain: "exmail.qq.com"
      authentication: :login
      enable_starttls_auto: true
      user_name: "huahua@companyname.com"

      password: "jbgsnmm"

 

原来不成功的是这样的(页面配置之后):

# default configuration options for all environments
default:
  # Outgoing emails configuration
  # See the examples below and the Rails guide for more configuration options:
  # http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      tls: false
      address: smtp.exmail.qq.com
      port: 465
      domain: example.net
      authentication: :login
      enable_starttls_auto: true
      # default configuration options for all environments
default:
  # Outgoing emails configuration
  # See the examples below and the Rails guide for more configuration options:
  # http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      tls: false
      address: smtp.exmail.qq.com
      port: 465
      domain: example.net
      authentication: :login
      enable_starttls_auto: true
       user_name: "huahua@companyname.com"

      password: "jbgsnmm"

         

说要说明的是:1、在改动yml文件之前,已经在页面配置,配置之后就是第二段仍然发布出去邮件,然后改成第一段就好了。

2、其他人也有这个报错,错的地方不一样哈,但很有价值哈。参考链接http://oyqiaojin.blog.163.com/blog/static/594525652011411334509/

另外推荐一篇非常有价值的文字https://blog.csdn.net/liumiaocn/article/details/74089940?utm_source=blogxgwz8

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值