Copyright © 2015-2018 Marc Worrell
Behaviours: zotonic_model.
Authors: Marc Worrell (marc@worrell.nl).
block/2 | |
clear_status/2 | |
clear_status/3 | Clear the status of the email address. |
get/2 | Fetch the stats from an email address. |
install/1 | Install the email tracking table. |
is_ok_to_send/2 | Check if an email address is known to be valid, if nothing known then assume it is valid. |
is_valid/2 | Check if an email address is known to be valid, if nothing known then assume it is valid. |
m_get/3 | Fetch the value for the key from a model source. |
mark_bounced/2 | Mark as bounced, this is handled as permanent error, though it could be temporary if the bounce happened due to some temporary problem on the receiver's end. |
mark_failed/4 | Mark as failed, happens on connection errors or on errors returned by the receiving smtp server. |
mark_read/2 | Mark an email read, typically because a link in the email is followed. |
mark_received/2 | Increment the email receive counter. |
mark_sent/3 | Track email sending, a sent is marked 'final' if there wasn't a bounce within 4 hours. |
block(Email0::binary(), Context::#context{}) -> ok
clear_status(Email, Context) -> any()
clear_status(Id, Email0, Context) -> any()
Clear the status of the email address
get(Email0::binary(), Context::#context{}) -> list() | undefined
Fetch the stats from an email address
install(Context) -> any()
Install the email tracking table
is_ok_to_send(Email::binary(), Context::#context{}) -> boolean()
Check if an email address is known to be valid, if nothing known then assume it is valid.
is_valid(Email::binary(), Context::#context{}) -> boolean()
Check if an email address is known to be valid, if nothing known then assume it is valid.
m_get(Rest::list(), Msg::zotonic_model:opt_msg(), Context::z:context()) -> zotonic_model:return()
Fetch the value for the key from a model source
mark_bounced(Email0::binary(), Context::#context{}) -> ok
Mark as bounced, this is handled as permanent error, though it could be temporary if the bounce happened due to some temporary problem on the receiver's end.
mark_failed(Email0::binary(), IsFinal::boolean(), Status::binary() | {error, term()} | undefined, Context::#context{}) -> ok
Mark as failed, happens on connection errors or on errors returned by the receiving smtp server. The final flag is set if our smtp server received a permanent error or gave up sending the email. Keep a counter (recent_error_ct) and date (recent_error) which are updated at most once a day.
mark_read(Email0::binary(), Context::#context{}) -> ok
Mark an email read, typically because a link in the email is followed.
mark_received(Email0::binary(), Context::#context{}) -> ok
Increment the email receive counter. This doesn't say anything about the validity of the email address, only that we received an email with this envelope address.
mark_sent(Email0::binary(), X2::boolean(), Context::#context{}) -> ok
Track email sending, a sent is marked 'final' if there wasn't a bounce within 4 hours.
Generated by EDoc