View Source Swoosh.Adapter behaviour (Swoosh v1.14.3)
Specification of the email delivery adapter.
Summary
Callbacks
Delivers an email with the given config.
Delivers multiple emails with the given config in one request. Some email providers allow multiple messages to be sent in one HTTP request, for example Mailjet and Postmark allow this. Check your provider's documentation to see if that is possible.
Types
Callbacks
@callback deliver( %Swoosh.Email{ assigns: term(), attachments: term(), bcc: term(), cc: term(), from: term(), headers: term(), html_body: term(), private: term(), provider_options: term(), reply_to: term(), subject: term(), text_body: term(), to: term() }, config() ) :: {:ok, term()} | {:error, term()}
Delivers an email with the given config.
@callback deliver_many( [ %Swoosh.Email{ assigns: term(), attachments: term(), bcc: term(), cc: term(), from: term(), headers: term(), html_body: term(), private: term(), provider_options: term(), reply_to: term(), subject: term(), text_body: term(), to: term() } ], config() ) :: {:ok, [term()]} | {:error, term()}
Delivers multiple emails with the given config in one request. Some email providers allow multiple messages to be sent in one HTTP request, for example Mailjet and Postmark allow this. Check your provider's documentation to see if that is possible.