ravenx v0.1.0 Ravenx.Strategy.Email

Ravenx Email strategy.

Used to dispatch notifications via email.

Summary

Functions

Function used to send a notification via email

Functions

available_adapters()
available_adapters :: keyword
call(payload, opts \\ %{})
call(map, map) :: {atom, any}

Function used to send a notification via email.

It receives two maps, containing the payload and options.

The payload can include this keys:

  • from: (required) the email address from which the email is sent.
  • to: (required) a list of email addresses that will receive the email.
  • cc: a list of email addresses that will receive a copy of the email.
  • bcc: a list of email addresses that will receive a hidden copy of the email.
  • subject: the subject of the e-mail.
  • text_body: the text version of the message.
  • html_body: that HTML version of the message.

In the options map there must be an adapter key indicating one of the available adapters, and also the configuration required for each adapter.

It will respond with a tuple, indicating if everything is :ok or there was an :error.