Module watts_mail

a simple mail sending implementation using gen_smtp.

Description

a simple mail sending implementation using gen_smtp

Function Index

compose_mail/4*create the whole mail with headers.
default_or_given_sender/1*decide between given sender and default.
handle_mail_result/1*handle mail results and return either ok or error, also log errors.
maybe_send/4*send a mail if configured, given subject, body and receipients.
send/3send a mail (if enabled), given subject, body and receipients.
sender/0*get the sender.

Function Details

compose_mail/4 *

compose_mail(Subject::string(), Body::string(), Receipients::[string()], Sender::string()) -> string()

create the whole mail with headers

default_or_given_sender/1 *

default_or_given_sender(Sender) -> list()

decide between given sender and default

handle_mail_result/1 *

handle_mail_result(Result::binary() | {error, any(), any()}) -> ok | error

handle mail results and return either ok or error, also log errors

maybe_send/4 *

maybe_send(X1::boolean(), Subject::string(), Body::string(), Receipients::[string()]) -> atom()

send a mail if configured, given subject, body and receipients

send/3

send(Subject::string(), Body::string(), Receipients::[string()]) -> atom()

send a mail (if enabled), given subject, body and receipients

sender/0 *

sender() -> list()

get the sender


Generated by EDoc