Copyright © 2009-2017 Marc Worrell
Behaviours: gen_server.
Authors: Marc Worrell (marc@worrell.nl).
code_change/3 | Convert process state when code is changed. |
event/2 | Request confirmation of canceling this mailing. |
handle_call/3 | Handle a dropbox file with recipients. |
handle_cast/2 | Send a mailing. |
handle_info/2 | Poll the database for scheduled mailings. |
init/1 | Initiates the server. |
manage_schema/2 | Install the tables needed for the mailinglist and return the rsc datamodel. |
observe_admin_menu/3 | |
observe_mailinglist_message/2 | Send status messages to a recipient. |
observe_search_query/2 | |
observe_tick_24h/2 | Every 24h cleanup the mailinglists recipients. |
start_link/1 | Starts the server. |
terminate/2 | This function is called by a gen_server when it is about to terminate. |
code_change(OldVsn, State, Extra) -> {ok, NewState}
Convert process state when code is changed
event(Postback, Context) -> any()
Request confirmation of canceling this mailing.
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(Message::Msg, State) -> {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}
Send a mailing.
handle_info(Info, State) -> {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}
Poll the database for scheduled mailings.
init(Args) -> {ok, State} | {ok, State, Timeout} | ignore | {stop, Reason}
Initiates the server.
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(Admin_menu, Acc, Context) -> any()
observe_mailinglist_message(Mailinglist_message, Context) -> any()
Send status messages to a recipient.
observe_search_query(X1, Context) -> any()
observe_tick_24h(X1, Context) -> any()
Every 24h cleanup the mailinglists recipients.
start_link(Args) -> {ok, Pid} | ignore | {error, Error}
Starts the server
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