|
|
|
@ -155,13 +155,9 @@ class Mailer < ActionMailer::Base
|
|
|
|
|
@issue_author_url = url_for(user_activities_url(@author))
|
|
|
|
|
recipients ||= []
|
|
|
|
|
#将帖子创建者邮箱地址加入数组
|
|
|
|
|
if @forum.creator.mail_notification != 'day' && @forum.creator.mail_notification != 'week'
|
|
|
|
|
recipients << @forum.creator.mail
|
|
|
|
|
end
|
|
|
|
|
recipients << @forum.creator.mail
|
|
|
|
|
#回复人邮箱地址加入数组
|
|
|
|
|
if @author.mail_notification != 'day' && @author.mail_notification != 'week'
|
|
|
|
|
recipients << @author.mail
|
|
|
|
|
end
|
|
|
|
|
recipients << @author.mail
|
|
|
|
|
# cc = wiki_content.page.wiki.watcher_recipients - recipients
|
|
|
|
|
|
|
|
|
|
@memo_url = url_for(forum_memo_url(@forum, (@memo.parent_id.nil? ? @memo : @memo.parent_id)))
|
|
|
|
@ -202,12 +198,8 @@ class Mailer < ActionMailer::Base
|
|
|
|
|
# 验证用户的收取邮件的方式
|
|
|
|
|
recipients ||= []
|
|
|
|
|
recipients1 ||= []
|
|
|
|
|
if @mail.mail_notification != 'week' && @mail.mail_notification != 'day'
|
|
|
|
|
recipients1 = @mail.mail
|
|
|
|
|
end
|
|
|
|
|
if journals_for_message.jour.author.mail_notification != 'week' && journals_for_message.jour.author.mail_notification != 'day'
|
|
|
|
|
recipients = journals_for_message.jour.author.mail
|
|
|
|
|
end
|
|
|
|
|
recipients1 = @mail.mail
|
|
|
|
|
recipients = journals_for_message.jour.author.mail
|
|
|
|
|
|
|
|
|
|
# modify by nwb
|
|
|
|
|
#如果是直接留言并且留言对象是课程
|
|
|
|
@ -219,9 +211,7 @@ class Mailer < ActionMailer::Base
|
|
|
|
|
#收件人邮箱
|
|
|
|
|
@recipients ||= []
|
|
|
|
|
@members.each do |teacher|
|
|
|
|
|
if teacher.user.mail_notification != 'week' && teacher.user.mail_notification != 'day'
|
|
|
|
|
@recipients << teacher.user.mail
|
|
|
|
|
end
|
|
|
|
|
@recipients << teacher.user.mail
|
|
|
|
|
end
|
|
|
|
|
mail :to => @recipients,
|
|
|
|
|
:subject => "#{l(:label_your_course)}#{journals_for_message.jour.name}#{l(:label_have_message)} ",
|
|
|
|
@ -779,7 +769,7 @@ class Mailer < ActionMailer::Base
|
|
|
|
|
r_reps << r
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
elsif reps.is_a? User
|
|
|
|
|
elsif reps.is_a? String
|
|
|
|
|
u = User.find_by_mail(r)
|
|
|
|
|
if u && u.mail_notification == 'all'
|
|
|
|
|
r_reps << r
|
|
|
|
|