网上找了半天,有很多答案,最后自己测试找出一个解决办法。
1.找到安装位置
D:\Bitnami\redmine-2.5.2-2\apps\redmine\htdocs\config下的文件configuration.yml
这个文件里面会有一段初始的邮件配置
# default configuration options for all environments default: # Outgoing emails configuration (see examples above) email_delivery: delivery_method: :smtp smtp_settings: address: smtp.gmail.com port: 587 domain: example.net authentication: :login user_name: password: |
然后 你去网上搜索会发现有很多的说法,大部分是针对gmail和163之类的邮箱,但是如果你要配置企业内部使用的邮箱,按照网上的说法会发现不行。
后来找到网上一个同仁的解释:http://wangzhe.me/archives/1352
复制代码
redmine安装完毕后开启邮件通知,发送测试邮件时报错:"hostname was not match with the server certificate"
解决方法:
修改redmine/config/configuration.yml # default configuration options for all environments default: # Outgoing emails configuration (see examples above) email_delivery: delivery_method: :smtp smtp_settings: tls: false address: 邮件服务器地址 port: 25 domain: 邮件服务器地址 authentication: :login user_name: test@163.com password: 123456 openssl_verify_mode: 'none' authentication: :plain 改为 login 增加一行 openssl_verify_mode: 'none' |
这里很重要,注意上面是你邮件服务器的地址,比如163的会是smtp.163.com,outlook大部分是exchange,这个是支持smtp协议的,邮箱就是你的企业邮箱 密码 邮箱密码,25和587两个端口应该都支持邮件
发送。备注:如果密码是123456这种纯数字 需要加上单引号'123456'
上文内容不用于商业目的,如涉及知识产权问题,请权利人联系博为峰小编(021-64471599-8017),我们将立即处理。