Extract all meeting participants and send email using a loop to avoid specify BCC option

pull/6827/head
slawa 10 years ago
parent 373fd026b4
commit bcd5803c60
  1. 6
      app/controllers/meeting_contents_controller.rb

@ -83,7 +83,11 @@ class MeetingContentsController < ApplicationController
def notify
unless @content.new_record?
MeetingMailer.content_for_review(@content, @content_type).deliver
recipients = @content.meeting.participants.collect{|p| p.mail}.reject{|r| r == @content.meeting.author.mail}
recipients << @content.meeting.author.mail if @content.meeting.author.preference[:no_self_notified]
recipients.each do |recipient|
MeetingMailer.content_for_review(@content, @content_type, recipient).deliver
end
flash[:notice] = l(:notice_successful_notification)
end
redirect_back_or_default :controller => '/meetings', :action => 'show', :id => @meeting

Loading…
Cancel
Save