Class: Howlr::Deliverers::Email
Defined Under Namespace
Classes: Mailer
Class Method Summary collapse
Class Method Details
.deliver(message, options = {}) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/howlr/deliverers.rb', line 26 def self.deliver(, = {}) recipients = [] .recipients.each do |r| if $OVERRIDE_RECIPIENT.blank? # set using --override-recipient CLI option recipients << (r.respond_to?(:address) ? r.address : r) else recipients << $OVERRIDE_RECIPIENT end end Mailer.raise_delivery_errors = true begin Mailer.( .subject, recipients, .from, .body, .content_type ) return true rescue => e .delivery_errors << e return false end end |