Z.Mailer (Portico/Z v0.1.0)
A simple mailer to send notifications via Mandrill
This is an Oban
worker, so it will enqueue all mail jobs for later sending. Therefore, it is non-blocking and can be used willy-nilly :)
Examples
You use it like this:
%{
subject: "My Subject",
message: "My message",
recipients: ["recipient@explo.org"],
from: "z@explo.org"
}
|> Elixir.Z.Mailer.new()
|> Oban.insert()
See perform/1
for more details.
Link to this section Summary
Functions
Send an EXPLO-formatted email through Mandrill.
Link to this section Functions
Link to this function
perform(job)
Send an EXPLO-formatted email through Mandrill.
The params are basically the same as the delegated function: ExploComm.Mandrill.send_email/3
:
subject
(String) - Subject of the emailmessage
(String) - The message to sendfrom
(String) - Sending email addressrecipients
([String]) - A list of recipient emails