gpt4 book ai didi

smtp - 如何在 Redmine 中配置电子邮件通知?

转载 作者:行者123 更新时间:2023-12-01 00:33:11 24 4
gpt4 key购买 nike

关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。












想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。

1年前关闭。




Improve this question




我已经使用 Bitnami 在离线模式下安装了 Redmine 并按如下方式配置了电子邮件通知,如 Redmine: Email Configuration 中所述

我的环境:

Environment:
Redmine version 2.3.2.stable
Ruby version 1.9.3-p231 (2012-05-25) [i386-mingw32]
Rails version 3.2.13
Environment production
Database adapter Mysql2
Redmine plugins: no plugin installed

configuration.yml 的一部分:
# default configuration options for all environments
default:
# Outgoing emails configuration (see examples above)
email_delivery:
delivery_method: :smtp
smtp_settings:
address: ...here smtp.domain or ip of smtp- server...
port: 25
domain: ...some domain...
authentication: :login
user_name: ...name@domain...
password: "..."

在同一个域中运行邮件服务器。

我从 Redmine UI 请求我的密码:

enter image description here

然而,消息并没有到来。

我在 production.log 中有什么:
Started POST "/redmine/account/lost_password" for 127.0.0.1 at 2013-08-22 21:38:21 +0400
Processing by AccountController#lost_password as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"252n1tBNbFP/BzQ6spgzVTx/yKnltmhd9jHhzcgyTwU=", "mail"=>"...name@domain...", "commit"=>"Submit"}
Current user: anonymous
Rendered mailer/lost_password.text.erb within layouts/mailer (0.0ms)
Rendered mailer/lost_password.html.erb within layouts/mailer (1.0ms)
Redirected to http://localhost/redmine/login
Completed 302 Found in 886ms (ActiveRecord: 68.0ms)
Started GET "/redmine/login" for 127.0.0.1 at 2013-08-22 21:38:22 +0400
Processing by AccountController#login as HTML
Current user: anonymous
Rendered account/login.html.erb within layouts/base (7.0ms)
Completed 200 OK in 20ms (Views: 16.0ms | ActiveRecord: 1.0ms)

在内网外测试这个配置的时候,我用的是gmail。 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: gmail.com
authentication: :login
user_name: ...name@gmail.com
password: "..."

当我在此配置中请求密码时,消息来了。

信息:
To change the password, click on the following link:
http://localhost:3000/account/lost_password?token=dd36a006157cfa8d208ba11822c9283f14ef5f65

User: alexey

You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://hostname/my/account

我现在在 production.log 中看到的:
Started POST "/redmine/account/lost_password" for 127.0.0.1 at 2013-08-22 22:09:40 +0400
Processing by AccountController#lost_password as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"252n1tBNbFP/BzQ6spgzVTx/yKnltmhd9jHhzcgyTwU=", "mail"=>"...name@domain...", "commit"=>"Submit"}
Current user: anonymous
Rendered mailer/lost_password.text.erb within layouts/mailer (3.0ms)
Rendered mailer/lost_password.html.erb within layouts/mailer (1.0ms)
Redirected to http://localhost/redmine/login
Completed 302 Found in 2769ms (ActiveRecord: 73.0ms)
Started GET "/redmine/login" for 127.0.0.1 at 2013-08-22 22:09:43 +0400
Processing by AccountController#login as HTML
Current user: anonymous
Rendered account/login.html.erb within layouts/base (4.0ms)
Completed 200 OK in 10ms (Views: 8.0ms | ActiveRecord: 1.0ms)

所以,
  • 如果我使用 gmail,邮件会被发送和投递
  • 如果我使用other,则消息不发送或已发送但未送达

  • 我做错了什么?如何在 Redmine 中配置电子邮件通知?

    最佳答案

    请看一下语法。

    production:
    email_delivery:
    delivery_method: :smtp
    smtp_settings:
    address: ********.com
    port: 25
    domain: ********.com
    enable_starttls_auto: false
    authentication: :login
    user_name: "#############@***.com"
    password: "####"

    此外,关键字“生产”应该是特定于环境的。

    我引用了他们的官方配置页面。
    https://www.redmine.org/projects/redmine/wiki/EmailConfiguration

    关于smtp - 如何在 Redmine 中配置电子邮件通知?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18388516/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com