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