Sends an email notification. Emails will always be sent with deliver_later
deliver_by :email, mailer: "UserMailer"
-
mailer
- RequiredThe mailer that should send the email
-
method: :invoice_paid
- OptionalUsed to customize the method on the mailer that is called
-
format: :format_for_email
- OptionalUse a custom method to define the params sent to the mailer.
recipient
will be merged into the params. -
enqueue: false
- OptionalUse
deliver_later
to queue email delivery with ActiveJob. This isfalse
by default as each delivery method is already a separate job.