PageRenderTime 25ms CodeModel.GetById 8ms app.highlight 11ms RepoModel.GetById 1ms app.codeStats 0ms

/doc/modules/mod_mailinglist/mod_mailinglist.html

http://github.com/zotonic/zotonic
HTML | 111 lines | 93 code | 18 blank | 0 comment | 0 complexity | c89cf05ad1272a59921687385f6ed316 MD5 | raw file
  1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2<html>
  3<head>
  4<title>Module mod_mailinglist</title>
  5<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
  6</head>
  7<body bgcolor="white">
  8<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
  9<hr>
 10
 11<h1>Module mod_mailinglist</h1>
 12<ul class="index"><li><a href="#description">Description</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>Mailinglist implementation.
 13<p>Copyright Š 2009 Marc Worrell
 14  Date: 2009-11-23</p>
 15
 16<p><b>Behaviours:</b> <a href="gen_server.html"><tt>gen_server</tt></a>.</p>
 17<p><b>Authors:</b> Marc Worrell (<a href="mailto:marc@worrell.nl"><tt>marc@worrell.nl</tt></a>).</p>
 18
 19<h2><a name="description">Description</a></h2>Mailinglist implementation. Enables to send pages to a list of recipients.
 20<h2><a name="index">Function Index</a></h2>
 21<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#code_change-3">code_change/3</a></td><td>Convert process state when code is changed.</td></tr>
 22<tr><td valign="top"><a href="#datamodel-1">datamodel/1</a></td><td>Install the tables needed for the mailinglist and return the rsc datamodel.</td></tr>
 23<tr><td valign="top"><a href="#event-2">event/2</a></td><td>Request confirmation of canceling this mailing.</td></tr>
 24<tr><td valign="top"><a href="#handle_call-3">handle_call/3</a></td><td>Handle a dropbox file with recipients.</td></tr>
 25<tr><td valign="top"><a href="#handle_cast-2">handle_cast/2</a></td><td>Send a mailing.</td></tr>
 26<tr><td valign="top"><a href="#handle_info-2">handle_info/2</a></td><td>Poll the database for scheduled mailings.</td></tr>
 27<tr><td valign="top"><a href="#init-1">init/1</a></td><td>Initiates the server.</td></tr>
 28<tr><td valign="top"><a href="#observe_email_bounced-2">observe_email_bounced/2</a></td><td>When an e-mail bounces, disable the corresponding recipients and mark them as bounced.</td></tr>
 29<tr><td valign="top"><a href="#observe_mailinglist_message-2">observe_mailinglist_message/2</a></td><td>Send status messages to a recipient.</td></tr>
 30<tr><td valign="top"><a href="#observe_search_query-2">observe_search_query/2</a></td><td></td></tr>
 31<tr><td valign="top"><a href="#page_attachments-2">page_attachments/2</a></td><td>Return list of attachments for this page as a list of files.</td></tr>
 32<tr><td valign="top"><a href="#start_link-1">start_link/1</a></td><td>Starts the server.</td></tr>
 33<tr><td valign="top"><a href="#terminate-2">terminate/2</a></td><td>This function is called by a gen_server when it is about to
 34  terminate.</td></tr>
 35</table>
 36
 37<h2><a name="functions">Function Details</a></h2>
 38
 39<h3 class="function"><a name="code_change-3">code_change/3</a></h3>
 40<div class="spec">
 41<p><tt>code_change(OldVsn, State, Extra) -&gt; {ok, NewState}</tt></p>
 42</div><p>Convert process state when code is changed</p>
 43
 44<h3 class="function"><a name="datamodel-1">datamodel/1</a></h3>
 45<div class="spec">
 46<p><tt>datamodel(Context) -&gt; any()</tt></p>
 47</div><p>Install the tables needed for the mailinglist and return the rsc datamodel.</p>
 48
 49<h3 class="function"><a name="event-2">event/2</a></h3>
 50<div class="spec">
 51<p><tt>event(X1, Context) -&gt; any()</tt></p>
 52</div><p>Request confirmation of canceling this mailing.</p>
 53
 54<h3 class="function"><a name="handle_call-3">handle_call/3</a></h3>
 55<div class="spec">
 56<p><tt>handle_call(Message::Request, From, State) -&gt; {reply, Reply, State} | {reply, Reply, State, Timeout} | {noreply, State} | {noreply, State, Timeout} | {stop, Reason, Reply, State} | {stop, Reason, State}</tt></p>
 57</div><p>Handle a dropbox file with recipients.</p>
 58
 59<h3 class="function"><a name="handle_cast-2">handle_cast/2</a></h3>
 60<div class="spec">
 61<p><tt>handle_cast(Message::Msg, State) -&gt; {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}</tt></p>
 62</div><p>Send a mailing.</p>
 63
 64<h3 class="function"><a name="handle_info-2">handle_info/2</a></h3>
 65<div class="spec">
 66<p><tt>handle_info(Info, State) -&gt; {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}</tt></p>
 67</div><p>Poll the database for scheduled mailings.</p>
 68
 69<h3 class="function"><a name="init-1">init/1</a></h3>
 70<div class="spec">
 71<p><tt>init(Args) -&gt; {ok, State} | {ok, State, Timeout} | ignore | {stop, Reason}</tt></p>
 72</div><p>Initiates the server.</p>
 73
 74<h3 class="function"><a name="observe_email_bounced-2">observe_email_bounced/2</a></h3>
 75<div class="spec">
 76<p><tt>observe_email_bounced(B, Context) -&gt; any()</tt></p>
 77</div><p>When an e-mail bounces, disable the corresponding recipients and mark them as bounced.</p>
 78
 79<h3 class="function"><a name="observe_mailinglist_message-2">observe_mailinglist_message/2</a></h3>
 80<div class="spec">
 81<p><tt>observe_mailinglist_message(Mailinglist_message, Context) -&gt; any()</tt></p>
 82</div><p>Send status messages to a recipient.</p>
 83
 84<h3 class="function"><a name="observe_search_query-2">observe_search_query/2</a></h3>
 85<div class="spec">
 86<p><tt>observe_search_query(X1, Context) -&gt; any()</tt></p>
 87</div>
 88
 89<h3 class="function"><a name="page_attachments-2">page_attachments/2</a></h3>
 90<div class="spec">
 91<p><tt>page_attachments(Id, Context) -&gt; any()</tt></p>
 92</div><p>Return list of attachments for this page as a list of files. Attachments are outgoing 'hasdocument' edges.</p>
 93
 94<h3 class="function"><a name="start_link-1">start_link/1</a></h3>
 95<div class="spec">
 96<p><tt>start_link(Args) -&gt; {ok, Pid} | ignore | {error, Error}</tt></p>
 97</div><p>Starts the server</p>
 98
 99<h3 class="function"><a name="terminate-2">terminate/2</a></h3>
100<div class="spec">
101<p><tt>terminate(Reason, State) -&gt; <a href="#type-void">void()</a></tt></p>
102</div><p>This function is called by a gen_server when it is about to
103  terminate. It should be the opposite of Module:init/1 and do any necessary
104  cleaning up. When it returns, the gen_server terminates with Reason.
105  The return value is ignored.</p>
106<hr>
107
108<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
109<p><i>Generated by EDoc, Oct 13 2011, 14:45:58.</i></p>
110</body>
111</html>