Module mod_mailinglist

Mailinglist implementation.

Copyright © 2009-2017 Marc Worrell

Behaviours: gen_server.

Authors: Marc Worrell (marc@worrell.nl).

Description

Mailinglist implementation. Enables to send pages to a list of recipients.

Function Index

code_change/3Convert process state when code is changed.
event/2Request confirmation of canceling this mailing.
handle_call/3Handle a dropbox file with recipients.
handle_cast/2Send a mailing.
handle_info/2Poll the database for scheduled mailings.
init/1Initiates the server.
manage_schema/2Install the tables needed for the mailinglist and return the rsc datamodel.
observe_admin_menu/3
observe_mailinglist_message/2Send status messages to a recipient.
observe_search_query/2
observe_tick_24h/2Every 24h cleanup the mailinglists recipients.
start_link/1Starts the server.
terminate/2This function is called by a gen_server when it is about to terminate.

Function Details

code_change/3

code_change(OldVsn, State, Extra) -> {ok, NewState}

Convert process state when code is changed

event/2

event(Postback, Context) -> any()

Request confirmation of canceling this mailing.

handle_call/3

handle_call(Message::Request, From, State) -> {reply, Reply, State} | {reply, Reply, State, Timeout} | {noreply, State} | {noreply, State, Timeout} | {stop, Reason, Reply, State} | {stop, Reason, State}

Handle a dropbox file with recipients.

handle_cast/2

handle_cast(Message::Msg, State) -> {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}

Send a mailing.

handle_info/2

handle_info(Info, State) -> {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}

Poll the database for scheduled mailings.

init/1

init(Args) -> {ok, State} | {ok, State, Timeout} | ignore | {stop, Reason}

Initiates the server.

manage_schema/2

manage_schema(Version::install | {upgrade, pos_integer()}, Context::z:context()) -> #datamodel{}

Install the tables needed for the mailinglist and return the rsc datamodel.

observe_admin_menu/3

observe_admin_menu(Admin_menu, Acc, Context) -> any()

observe_mailinglist_message/2

observe_mailinglist_message(Mailinglist_message, Context) -> any()

Send status messages to a recipient.

observe_search_query/2

observe_search_query(X1, Context) -> any()

observe_tick_24h/2

observe_tick_24h(X1, Context) -> any()

Every 24h cleanup the mailinglists recipients.

start_link/1

start_link(Args) -> {ok, Pid} | ignore | {error, Error}

Starts the server

terminate/2

terminate(Reason, State) -> void()

This function is called by a gen_server when it is about to terminate. It should be the opposite of Module:init/1 and do any necessary cleaning up. When it returns, the gen_server terminates with Reason. The return value is ignored.


Generated by EDoc