suite
This commit is contained in:
parent
767bed7998
commit
0d1d31bfa9
@ -61,6 +61,7 @@ class GeneralMails < ActionMailer::Base
|
||||
def general2(email_to, subject, body, mail_options = {})
|
||||
@options = mail_options
|
||||
|
||||
@file_tunel = @options[:file_tunel]
|
||||
@m_odr = @options[:m_odr]
|
||||
|
||||
@to = email_to
|
||||
@ -77,6 +78,8 @@ class GeneralMails < ActionMailer::Base
|
||||
@from = @options[:from]
|
||||
elsif @m_odr and @m_odr.email_from?
|
||||
@from = @m_odr.email_from
|
||||
elsif @file_tunel and @file_tunel.from_email?
|
||||
@from = @file_tunel.from_email
|
||||
end
|
||||
|
||||
if @from
|
||||
|
@ -91,7 +91,7 @@ class MailHist < ApplicationRecord
|
||||
elsif @m_odr and @m_odr.email_from?
|
||||
@from = @m_odr.email_from
|
||||
elsif @file_tunel and @file_tunel.from_email?
|
||||
@file_tunel = @file_tunel.from_email
|
||||
@from = @file_tunel.from_email
|
||||
end
|
||||
|
||||
|
||||
@ -101,7 +101,7 @@ class MailHist < ApplicationRecord
|
||||
mail_history = MailHist.create(:lang_site => @lang_site, :to_email => @to_email, :from_email => @from, :element => options[:element], :subject => @subject, :body => @body, :m_odr => @m_odr, :m_odr_rep => @m_odr_rep, :mail_content => @mail_content, :mail_type => @mail_type)
|
||||
|
||||
|
||||
mail = GeneralMails.general2(@to_email, @subject, @body, mail_options = {:m_odr => @m_odr})
|
||||
mail = GeneralMails.general2(@to_email, @subject, @body, mail_options = {:m_odr => @m_odr, :file_tunel => @file_tunel})
|
||||
|
||||
mail_history.subject_send = @subject
|
||||
mail_history.body_send = mail.body.encoded
|
||||
|
Loading…
x
Reference in New Issue
Block a user