8
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/qwop_client/mailers/sendgrid.rb', line 8
def self.queue(queue, mail)
mail.inform_interceptors
mail.inform_observers
to = mail.[:to].to_s
from = mail.[:from].to_s
subject = mail.subject
text_content = mail.parts[0] ? mail.parts[0].decoded : ""
html_content = mail.parts[1].decoded if mail.parts.length > 0
= {"X-SMTPAPI" => mail['X-SMTPAPI'].to_s}
QwopClient::Client.enqueue(queue, [to, from, subject, text_content, html_content, , ActionMailer::Base.perform_deliveries])
end
|