Fixed the issue of administrators not receiving emails.
This commit is contained in:
parent
8bceab05ae
commit
b1fb3cc44c
|
|
@ -599,24 +599,23 @@ class AsksController < ApplicationController
|
|||
"usage_rule" => @usage_rule
|
||||
}
|
||||
|
||||
unless manager_emails.empty?
|
||||
template_data["bcc_recipients"] = manager_emails.join(',')
|
||||
end
|
||||
group_mail = email_er.mail
|
||||
manager_emails = email_er.reviewer_emails
|
||||
|
||||
all_recipients = ([group_mail] + manager_emails).flatten.compact.uniq
|
||||
|
||||
email_er.email.update_attributes(
|
||||
:mail_lang=> site.default_locale,
|
||||
:create_user=>(current_user rescue nil),
|
||||
:mail_sentdate=>mail_sentdate,
|
||||
:module_app=>@module_app,
|
||||
:mail_to=>group_mail,
|
||||
:mail_subject=>mail_subject,
|
||||
:template=>'asks/email',
|
||||
:template_data=>template_data,
|
||||
:mail_reply_to => (manager_emails.empty? ? nil : manager_emails)
|
||||
:mail_to=> all_recipients,
|
||||
:mail_subject=> mail_subject,
|
||||
:template=> 'asks/email',
|
||||
:template_data=> template_data,
|
||||
:mail_reply_to => (manager_emails.empty? ? nil : manager_emails)
|
||||
)
|
||||
|
||||
email_er.email.deliver
|
||||
end
|
||||
|
||||
def get_history
|
||||
question = AskQuestion.where(:serial_number => params["ticket_id"].to_i, :mail => params["email"]).first
|
||||
if !question.nil?
|
||||
|
|
|
|||
Loading…
Reference in New Issue