2013-08-22 376 views
3

我使用bitnami在離線模式下安裝了Redmine,並按如下所示配置了電子郵件通知 ,如Redmine: Email Configuration中所述。Redmine,BitNami:如何從郵件服務器發送郵件,與Gmail不同?

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: [email protected] 
     password: "..." 
    ... 

在同領域作品的郵件服務器。
好吧,一切都很好。我要求我的密碼,從管理平臺 -

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"=>"[email protected]", "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 -server。

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: [email protected] 
     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"=>"[email protected]", "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) 

我的環境

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 

所以,

  • 如果我使用gmail smtp-server,則會發送和發送消息。

  • 如果其他 - 該消息沒有發送或發送但未交付。

可能是什麼原因?如何從郵件服務器發送郵件,與Gmail不同?

回答

0

在我的情況,有助於以下配置:

configuration.yml

... 
    # default configuration options for all environments 
    default: 
     # Outgoing emails configuration (see examples above) 
     email_delivery: 
     delivery_method: :smtp 
     smtp_settings:  
      openssl_verify_mode: 'none' 
      enable_starttls_auto: false 
      address: ..ip of smtp- server.. 
      port: 25 
      domain: ...some domain... 
      authentication: :login 
      user_name: [email protected] 
      password: "..." 
    ... 

不幸的是,我無法訪問郵件服務器的日誌,它可以幫助解決這個問題。

+0

在其他一些郵件服務器上,只需指定_user name_而不使用_domain name_。 –

相關問題