Readmine 不发送邮件

Readmine doesn`t send mail

我添加到 configuration.yml 电子邮件设置。但通知不会通过电子邮件发送。我尝试从设置页面发送测试邮件,但我也没有收到任何电子邮件。

configuration.yml:

default:
  email_delivery:
    smtp_settings:
      address: mail.mysite.ru
      port: 587
      authentication: :login
      user_name: "redmine@mysite.ru"
      password: "mypass"

Production.log (https://yadi.sk/d/31jli2yOiraHn1) 不包含邮件错误,redmine.error.log 为空。

我不知道您是否缺少 development/production 环境的 smtp 设置。如果是这样,试试

default: &default
  email_delivery:
    smtp_settings:
      # Your settings

development:
  <<: *default

production:
  <<: *default
  # Override default settings if necessary
  user_name: "redmine@othersite.ru"
  password: "otherpass"

由于您使用的是端口 587,我想您的 smtp 服务器使用 StartTLS 来保护邮件交换。因此,您必须在 smtp_settings:

中添加以下行
enable_starttls_auto: true

如果 smtp 服务器使用不受信任的 SSL 认证,则也添加此行:

openssl_verify_mode: 'none'

再次尝试发送电子邮件。如果仍然无效,请尝试将 authentication: :login 更改为 authentication: :plain