Class: Nuntius::MailTransport
- Inherits:
-
BaseTransport
- Object
- BaseTransport
- Nuntius::MailTransport
- Defined in:
- app/transports/nuntius/mail_transport.rb
Instance Method Summary collapse
-
#deliver(message) ⇒ Object
We split per email address, to allow easy resends.
Methods inherited from BaseTransport
class_from_name, #kind, #providers
Instance Method Details
#deliver(message) ⇒ Object
We split per email address, to allow easy resends
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'app/transports/nuntius/mail_transport.rb', line 6 def deliver() .html = Inky::Core.new.release_the_kraken(.html) premailer = Premailer.new(.html, with_html_string: true) .html = premailer.to_inline_css .text = premailer.to_plain_text .request_id = SecureRandom.uuid tos = .to.split(/[\s;,]+/) = [] .to = tos.first << tos[1..].each do |to| # FIXME: Sadly this also duplicates the attachments = .deep_dup .to = to . = . if ..present? << end .each { |m| super(m) } .first end |