Redmine 設定 Email 自動通知

若有 Ticket 或者任何變動, 想要系統自動發送 Email 通知, 可依照此篇的步驟設定.

Web 介面 - 設定電子郵件提醒選項

  1. 登入後, 點選右上角 "我的帳戶"
  2. 於 "電子郵件提醒選項" (挑選那些改變需要 Email 通知)

Web 界面 - 整站設定

  1. 設定 -> 電子郵件提醒選項
  2. 勾選 選擇欲寄送提醒通知郵件之動作, ex: 問題已新增, 問題已更新

設定 Email 通知

設定 Email 通知步驟如下:

  1. cp /usr/share/doc/redmine/examples/configuration.yml.example.gz /tmp
  2. gunzip /tmp/configuration.yml.example.gz
  3. mv /tmp/configuration.yml.example /etc/redmine/default/email.yml
  4. sudo chown root:www-data /etc/redmine/default/email.yml
  5. sudo chmod 640 /etc/redmine/default/email.yml
  6. 修改設定符合即可. 可參考此篇: Setup Redmine to send email using GMail

    production:
    delivery_method: :smtp
    smtp_settings:
    tls: true
    address: smtp.gmail.com
    port: 25
    domain: smtp.gmail.com
    authentication: :login
    user_name: "user@gmail.com"
    password: "password"development:
    delivery_method: :smtp
    smtp_settings:
    address: "localhost"
    port: 25

  7. Localhost 寄信的話, 只需要下述設定即可.

    email_delivery:
    delivery_method: :smtp
    smtp_settings:
    address: localhost
    port: 25
    domain: your.domain.name

  8. 註: 一般到此即完成, 若還有問題, 在繼續往下試試看.
  9. vim /usr/share/redmine/config/environment.rb

    config.action_mailer.perform_deliveries = false
    改成
    config.action_mailer.perform_deliveries = true

  10. 感謝 clifflu 提醒, 記得安裝 action_mailer_optional_tls 套件

    cd /usr/share/redmine
    ruby script/plugin install git://github.com/collectiveidea/action_mailer_optional_tls.git

  11. 若未安裝 action_mailer_optional_tls 套件, 會在發信時顯示, 下述錯誤:

    530 5.7.0 Must issue a STARTTLS command first

相關網頁


關於 Tsung

對新奇的事物都很有興趣, 喜歡簡單的東西, 過簡單的生活.
本篇發表於 My_Note-Unix 並標籤為 。將永久鏈結加入書籤。

Redmine 設定 Email 自動通知 有 8 則回應

  1. Peter 說道:

    Dear Tsung,

    請教您一個問題
    我嘗試Setup mail notification, 我的email.yml如下

    production:
    delivery_method: :smtp
    smtp_settings:
    address: xxx.xxx.xxx.xxx <<< my SMTP Server IP
    port: xxxxx <<< my SMTP Server's port
    domain:
    authentication: :none <<< my SMTP server has no need to auth

    設定完成之後網頁上會出現如下的錯誤訊息
    請問您有遇過類似的問題嗎? 感謝!!

    Ruby on Rails application could not be started

    There may be a syntax error in the application's code. Please check for such errors and fix them.
    A required library may not installed. Please install all libraries that this application requires.
    The application may not be properly configured. Please check whether all configuration files are written correctly, fix any incorrect configurations, and restart this application.
    A service that the application relies on (such as the database server or the Ferret search engine server) may not have been started. Please start that service.
    Further information about the error may have been written to the application's log file. Please check it in order to analyse the problem.
    Error message:
    undefined method `each' for nil:NilClass

    Exception class:
    NoMethodError

    Application root:
    /usr/share/redmine

  2. Peter 說道:

    Dear Tsung,

    感謝您這麼快的回覆
    問題解決了
    就如你所提供的連結所提到的~
    yml的語法是indentation sensitive的
    而且必須是2個space

    非常感謝~
    redmine真是太好用了~
    繼續來去探索他的神奇之處

    Peter

  3. Mao 說道:

    可以請問一下~Redmine 設定 Email有 for windows
    因為我編輯:configuration.yml 都不行,還是需要在另外安裝套件才能發通知信

  4. jimmy 說道:

    你好,請問一下,如何設定只要寄信通知相關人員就好了呢?
    如:A指派給B事件,應該是發信給A及B,但我遇到他又發給CDE不相關的人員。
    不知你是否有遇過這個問題呢?

  5. 通告: Redmine 2.4版 設定 Email 自動通知 - Tsung's Blog

發表迴響