#freeze
''目次''
#contents
~
----
*RedmineでPOP before SMTP で通知メールを送るための設定 [#i2a9a637]
~
メール通知がPOP before SMTPに対応していない模様。~
以下の方法で対応可。
~
+"app\models\Mailer.rb"の先頭で接続先のSMTPサーバの設定を行う。
~
 # vi /home/htdocs/redmine-2.4.3/app/models/Mailer.rb
 
 ---(ここから)-----------------------------------------------------------
 require 'net/pop'
 
 ActionMailer::Base.delivery_method = :smtp
 ActionMailer::Base.smtp_settings = {
   :address => 'smtp.hogehoge.com',   # SMTPサーバのアドレス
   :port => 25,
   :domain => 'localhost',            # メールを送信する自身のドメイン
   :authentication => 'none'          # 認証はなし
 }
 ---(ここまで)-----------------------------------------------------------
~
+後方にある''reminder''メソッド内でPOP認証を行う。
~
 def reminder(user, issues, days)
   set_language_if_valid user.language
   @issues = issues
   @days = days
   @issues_url = url_for(:controller => 'issues', :action => 'index',
                               :set_filter => 1, :assigned_to_id => user.id,
                               :sort => 'due_date:asc')
   mail :to => user.mail,
     :subject => l(:mail_subject_reminder, :count => issues.size, :days => days)
 
   # POP before SMTPの設定                                                             ← これを追加
   Net::POP3.auth_only('pop.hogehoge.com', 110, 'ユーザ名', 'パスワード')              ← これを追加
 
 end
~

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS