我们最近从下载的虚拟机运行Redmine 2.3.2
并设置了一些初始设置。我需要为gmail设置电子邮件配置。我将configuration.yml
中找到的文件opt/bitnami/apps/redmine/htdocs/config
编辑为以下内容:
production:
email_delivery:
delivery_method: :smtp
smtp_settings:
tls: true
address: "smtp.gmail.com"
port: 587
domain: "smtp.gmail.com"
authentication: :plain
user_name: "user@gmail.com"
password: "password"
enable_starttls_auto: true
当我尝试浏览localhost/redmine
We're sorry, but something went wrong.
We've been notified about this issue and we'll take a look at it shortly.
有什么想法吗?
嗨,谢谢你的回复。现在似乎取得了一些进展:)现在的错误是不同的:发送邮件时出错(连接被拒绝 - 连接(2))。 以下是configuration.yml,我在括号中添加了空格数(sp)以确认
production: (no sp)
email_delivery: (2 sp at beginning)
delivery_method: :smtp (4 sp at beginning, 1 sp between the colons)
smtp_settings: (4 sp)
enable_startttls_auto: true (6 sp,1 sp after colon)
address: "smtp.gmail.com" (6 sp,1 sp after colon)
port: '587' (6 sp,1 sp after colon,single inverted commas)
domain: "smtp.gmail.com" (6 sp, 1 sp after colon)
authentication: plain (6 sp, 1 sp after colon)
user_name: "username@gmail.com" (6 sp,1 sp after colon)
password: "1234" (6 sp, 1 sp after colon)
我也删除了单引号和引号并没有成功。什么可能是错的想法?是否有任何日志文件可以提供有关后台发生的更多信息? 谢谢:))
答案 0 :(得分:2)
您是否在更改后重新启动了redmine?
你的缩进是否正确?在上面的粘贴中它不是,但stackoverflow可能已经破坏它...
官方建议与您所拥有的略有不同,请参阅http://www.redmine.org/projects/redmine/wiki/EmailConfiguration#Simple-Login-Authentication-default-settings并查看enable_starttls_auto: true
部分
它应该看起来像这样
production:
email_delivery:
delivery_method: :smtp
smtp_settings:
enable_starttls_auto: true
address: "smtp.gmail.com"
port: '587'
domain: "smtp.gmail.com"
authentication: :plain
user_name: "your_email@gmail.com"
password: "your_password"