lib/drill/mail/letter_opener.rb in drill-mailer-0.1.1 vs lib/drill/mail/letter_opener.rb in drill-mailer-0.3.0
- old
+ new
@@ -19,15 +19,19 @@
@mail = mail
@delivery_method = delivery_method
end
def deliver
+ return if params.skip_delivery
+
prepare_mail!
delivery_method.deliver!(mail)
end
- alias_method :deliver_later, :deliver
+ def deliver_later(wait: nil)
+ deliver
+ end
private
def prepare_mail!
mail.to = Array(params.to) + Array(params.cc)