Copyright © 2009-2020 Marc Worrell
Behaviours: zotonic_model.
Authors: Marc Worrell (marc@worrell.nl).
check_scheduled/1 | Fetch the next scheduled mailing that are published and in the publication date range. |
count_recipients/2 | |
delete_scheduled/3 | Delete a scheduled mailing. |
get_email_from/2 | Get the "from" address used for this mailing list. |
get_enabled_recipients/2 | Fetch all enabled recipients from a list. |
get_recipients_by_email/2 | Get all recipients with this email address. |
get_scheduled/2 | Get the list of scheduled mailings for a page. |
get_stats/2 | Get the stats for the mailing. |
insert_recipient/4 | Insert a recipient in the mailing list, send a message to the recipient when needed. |
insert_recipient/5 | |
insert_recipients/4 | Replace all recipients of the mailinglist. |
insert_scheduled/3 | Insert a mailing to be send when the page becomes visible. |
list_recipients/2 | List all recipients of a mailinglist (as maps with binary keys, props expanded). |
m_get/3 | Fetch the value for the key from a model source. |
normalize_email/1 | |
periodic_cleanup/1 | Periodically remove bouncing and disabled addresses from the mailinglist. |
recipient_confirm/2 | Confirm the recipient with the given unique confirmation key. |
recipient_delete/2 | Delete a recipient and send the recipient a goodbye e-mail. |
recipient_delete/3 | Delete a recipient by list id and email. |
recipient_delete_quiet/2 | Delete a recipient without sending the recipient a goodbye e-mail. |
recipient_get/2 | Fetch the recipient record for the recipient id. |
recipient_get/3 | Fetch the recipient record by e-mail address. |
recipient_is_enabled_toggle/2 | Toggle the enabled flag of a recipient. |
recipient_set_operation/4 | Perform a set operation on two lists. |
recipients_clear/2 | Clear all recipients of the list. |
reset_log_email/3 | Reset the email log for given list/page combination, allowing one to send the same page again to the given list. |
update_recipient/3 | Update a single recipient; changing e-mail address or name details. |
check_scheduled(Context) -> any()
Fetch the next scheduled mailing that are published and in the publication date range.
count_recipients(ListId::m_rsc:resource_id(), Context::z:context()) -> non_neg_integer()
delete_scheduled(ListId, PageId, Context) -> any()
Delete a scheduled mailing
get_email_from(ListId, Context) -> any()
Get the "from" address used for this mailing list. Looks first in the mailinglist rsc for a ' mailinglist_reply_to' field; falls back to site.email_from config variable.
get_enabled_recipients(ListId::m_rsc:resource_id(), Context::z:context()) -> [binary()]
Fetch all enabled recipients from a list.
get_recipients_by_email(Email, Context) -> any()
Get all recipients with this email address.
get_scheduled(Id, Context) -> any()
Get the list of scheduled mailings for a page.
get_stats(ListId::m_rsc:resource_id(), Context::z:contex()) -> map()
Get the stats for the mailing. Number of recipients and list of scheduled resources.
insert_recipient(ListId, Email, WelcomeMessageType, Context) -> any()
Insert a recipient in the mailing list, send a message to the recipient when needed.
insert_recipient(ListId, Email, Props, WelcomeMessageType, Context) -> any()
insert_recipients(ListId::m_rsc:resource_id(), Recipients::[binary() | string()] | binary(), IsTruncate::boolean(), Context::z:context()) -> ok | {error, term()}
Replace all recipients of the mailinglist. Do not send welcome messages to the recipients.
insert_scheduled(ListId, PageId, Context) -> any()
Insert a mailing to be send when the page becomes visible
list_recipients(ListId::m_rsc:resource_id(), Context::z:context()) -> {ok, [map()]} | {error, term()}
List all recipients of a mailinglist (as maps with binary keys, props expanded)
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
normalize_email(Email) -> any()
periodic_cleanup(Context::z:context()) -> ok
Periodically remove bouncing and disabled addresses from the mailinglist
recipient_confirm(ConfirmKey::binary(), Context::z:context()) -> {ok, m_rsc:resource_id()} | {error, term()}
Confirm the recipient with the given unique confirmation key.
recipient_delete(RecipientId, Context) -> any()
Delete a recipient and send the recipient a goodbye e-mail.
recipient_delete(ListId, Email, Context) -> any()
Delete a recipient by list id and email
recipient_delete_quiet(RecipientId, Context) -> any()
Delete a recipient without sending the recipient a goodbye e-mail.
recipient_get(RecipientId, Context) -> any()
Fetch the recipient record for the recipient id.
recipient_get(ListId, Email, Context) -> any()
Fetch the recipient record by e-mail address
recipient_is_enabled_toggle(RecipientId, Context) -> any()
Toggle the enabled flag of a recipient
recipient_set_operation(Op, IdA, IdB, Context) -> any()
Perform a set operation on two lists. The result of the operation gets stored in the first list.
recipients_clear(ListId::m_rsc:resource_id(), Context::z:context()) -> ok
Clear all recipients of the list
reset_log_email(ListId, PageId, Context) -> any()
Reset the email log for given list/page combination, allowing one to send the same page again to the given list.
update_recipient(RcptId, Props, Context) -> any()
Update a single recipient; changing e-mail address or name details.
Generated by EDoc