/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. <h1>Module mod_mailinglist</h1>
  11. <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.
  12. <p>Copyright Š 2009 Marc Worrell
  13. Date: 2009-11-23</p>
  14. <p><b>Behaviours:</b> <a href="gen_server.html"><tt>gen_server</tt></a>.</p>
  15. <p><b>Authors:</b> Marc Worrell (<a href="mailto:marc@worrell.nl"><tt>marc@worrell.nl</tt></a>).</p>
  16. <h2><a name="description">Description</a></h2>Mailinglist implementation. Enables to send pages to a list of recipients.
  17. <h2><a name="index">Function Index</a></h2>
  18. <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>
  19. <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>
  20. <tr><td valign="top"><a href="#event-2">event/2</a></td><td>Request confirmation of canceling this mailing.</td></tr>
  21. <tr><td valign="top"><a href="#handle_call-3">handle_call/3</a></td><td>Handle a dropbox file with recipients.</td></tr>
  22. <tr><td valign="top"><a href="#handle_cast-2">handle_cast/2</a></td><td>Send a mailing.</td></tr>
  23. <tr><td valign="top"><a href="#handle_info-2">handle_info/2</a></td><td>Poll the database for scheduled mailings.</td></tr>
  24. <tr><td valign="top"><a href="#init-1">init/1</a></td><td>Initiates the server.</td></tr>
  25. <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>
  26. <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>
  27. <tr><td valign="top"><a href="#observe_search_query-2">observe_search_query/2</a></td><td></td></tr>
  28. <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>
  29. <tr><td valign="top"><a href="#start_link-1">start_link/1</a></td><td>Starts the server.</td></tr>
  30. <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
  31. terminate.</td></tr>
  32. </table>
  33. <h2><a name="functions">Function Details</a></h2>
  34. <h3 class="function"><a name="code_change-3">code_change/3</a></h3>
  35. <div class="spec">
  36. <p><tt>code_change(OldVsn, State, Extra) -&gt; {ok, NewState}</tt></p>
  37. </div><p>Convert process state when code is changed</p>
  38. <h3 class="function"><a name="datamodel-1">datamodel/1</a></h3>
  39. <div class="spec">
  40. <p><tt>datamodel(Context) -&gt; any()</tt></p>
  41. </div><p>Install the tables needed for the mailinglist and return the rsc datamodel.</p>
  42. <h3 class="function"><a name="event-2">event/2</a></h3>
  43. <div class="spec">
  44. <p><tt>event(X1, Context) -&gt; any()</tt></p>
  45. </div><p>Request confirmation of canceling this mailing.</p>
  46. <h3 class="function"><a name="handle_call-3">handle_call/3</a></h3>
  47. <div class="spec">
  48. <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>
  49. </div><p>Handle a dropbox file with recipients.</p>
  50. <h3 class="function"><a name="handle_cast-2">handle_cast/2</a></h3>
  51. <div class="spec">
  52. <p><tt>handle_cast(Message::Msg, State) -&gt; {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}</tt></p>
  53. </div><p>Send a mailing.</p>
  54. <h3 class="function"><a name="handle_info-2">handle_info/2</a></h3>
  55. <div class="spec">
  56. <p><tt>handle_info(Info, State) -&gt; {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}</tt></p>
  57. </div><p>Poll the database for scheduled mailings.</p>
  58. <h3 class="function"><a name="init-1">init/1</a></h3>
  59. <div class="spec">
  60. <p><tt>init(Args) -&gt; {ok, State} | {ok, State, Timeout} | ignore | {stop, Reason}</tt></p>
  61. </div><p>Initiates the server.</p>
  62. <h3 class="function"><a name="observe_email_bounced-2">observe_email_bounced/2</a></h3>
  63. <div class="spec">
  64. <p><tt>observe_email_bounced(B, Context) -&gt; any()</tt></p>
  65. </div><p>When an e-mail bounces, disable the corresponding recipients and mark them as bounced.</p>
  66. <h3 class="function"><a name="observe_mailinglist_message-2">observe_mailinglist_message/2</a></h3>
  67. <div class="spec">
  68. <p><tt>observe_mailinglist_message(Mailinglist_message, Context) -&gt; any()</tt></p>
  69. </div><p>Send status messages to a recipient.</p>
  70. <h3 class="function"><a name="observe_search_query-2">observe_search_query/2</a></h3>
  71. <div class="spec">
  72. <p><tt>observe_search_query(X1, Context) -&gt; any()</tt></p>
  73. </div>
  74. <h3 class="function"><a name="page_attachments-2">page_attachments/2</a></h3>
  75. <div class="spec">
  76. <p><tt>page_attachments(Id, Context) -&gt; any()</tt></p>
  77. </div><p>Return list of attachments for this page as a list of files. Attachments are outgoing 'hasdocument' edges.</p>
  78. <h3 class="function"><a name="start_link-1">start_link/1</a></h3>
  79. <div class="spec">
  80. <p><tt>start_link(Args) -&gt; {ok, Pid} | ignore | {error, Error}</tt></p>
  81. </div><p>Starts the server</p>
  82. <h3 class="function"><a name="terminate-2">terminate/2</a></h3>
  83. <div class="spec">
  84. <p><tt>terminate(Reason, State) -&gt; <a href="#type-void">void()</a></tt></p>
  85. </div><p>This function is called by a gen_server when it is about to
  86. terminate. It should be the opposite of Module:init/1 and do any necessary
  87. cleaning up. When it returns, the gen_server terminates with Reason.
  88. The return value is ignored.</p>
  89. <hr>
  90. <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>
  91. <p><i>Generated by EDoc, Oct 13 2011, 14:45:58.</i></p>
  92. </body>
  93. </html>