From 866ae3a38d6e6e9667942fa5e627736d1d263f89 Mon Sep 17 00:00:00 2001 From: z9hang Date: Thu, 29 May 2014 18:04:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E9=80=81=E9=82=AE=E4=BB=B6=E9=83=A8?= =?UTF-8?q?=E5=88=86=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/mailer.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/models/mailer.rb b/app/models/mailer.rb index e0ad54296..8ecd58eb1 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -57,6 +57,7 @@ class Mailer < ActionMailer::Base #如果是直接留言并且留言对象是Project并且Project类型是课程 if !journals_for_message.at_user && journals_for_message.jour.class.to_s.to_sym == :Project && journals_for_message.jour.project_type == 1 project = journals_for_message.jour + @author = journals_for_message.user #课程的教师 @teachers = searchTeacherAndAssistant journals_for_message.jour #收件人邮箱 @@ -440,10 +441,7 @@ class Mailer < ActionMailer::Base headers[:to].delete(@author.mail) if headers[:to].is_a?(Array) headers[:cc].delete(@author.mail) if headers[:cc].is_a?(Array) end - if !User.current.nil? - #不给本人发邮件 - headers[:to].delete(User.current.mail) if headers[:to].is_a?(Array) - end + if @author && @author.logged? redmine_headers 'Sender' => @author.login end