[an error occurred while processing this directive]
[<a href="index.shtml">Package Index</a></code> | <a href="index_std.shtml">Mudlib Index</a></code> | <a href="index_eff.shtml">Effect Index</a></code>]<br><h2>File /obj/handlers/mailer.c</h2>
The mailer handler object.  This is used to send mail and do oyther
stuff related to mail.
 The new mailer object ! *shiver*
 Thanks to Wodan and Pinkfish for ideas and help.
 By Turrican@Discworld, May 1995.<p>Written by Turrican<p>Started May 1995
<h2>Includes</h2>
This class includes the following files /include/player_handler.h, /include/mail.h, /include/localtime.h and /include/mime.h<h2>Method index</h2>
<ul>
<li><a href="#do_mail_message">do_mail_message</a>(string, string, string, string, string, , string, int)<br/>
This method allows a message to be mailed.
<li><a href="#finger_mail">finger_mail</a>(string)<br/>
This method returns the mail information which is placed into the
the finger command.
<li><a href="#folder_filename">folder_filename</a>(string)<li><a href="#format_date">format_date</a>(int)<br/>
This formats the date as needed by the mailer object.
<li><a href="#new_mail">new_mail</a>(string)<br/>
This method returns a string saying if the player has new mail or not.
<li><a href="#query_do_this_last">query_do_this_last</a>()<br/>
This method returns the call back fuinction to use when
the mailer has finished.
<li><a href="#query_folders">query_folders</a>(string)<br/>
This method returns the list of folders associated with the player.
<li><a href="#read_mail">read_mail</a>(string, string)<br/>
This method is the main entry point to the mailer.
<li><a href="#set_do_this_last">set_do_this_last</a>(mixed *)<br/>
This method sets the call back fuinction to use when
the mailer has finished.
</ul>
<h2>Public Functions</h2>
These are functions that everyone can access.<p>
<dl>
<dt class="autodocfuncname"><a name="do_mail_message">
do_mail_message</a><pre class="autodocfuncdef">
varargs int do_mail_message(string t,
                            string from,
                            string sub,
                            string ccs,
                            string body,
                             int,
                            string only_to,
                            int flag)
</pre><dd><br />
This method allows a message to be mailed.  It checks the previous
object to make sure it is one of the allowed set to
do mailing.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
t - who it is to<br />
from - who it is from<br />
sub - the subject of the message<br />
ccs - the carbon copy recipients<br />
body - the body of the message<br />
only_to - only mail to the to address<br />
flag - prevent this_player() from getting the messages if flag != 0<br />
<br />
<dd><b>Example:</b>
<br/><pre>MAIL_HANDLER->do_mail_message("pinkfish", "gumboot, killer tomato":,
                              "About the tomatoes", "",
                  "The grass ius greener yesterday,.\nYours\nGumboot.");
</pre><br /></dl>

<dt class="autodocfuncname"><a name="finger_mail">
finger_mail</a><pre class="autodocfuncdef">
string finger_mail(string pname)
</pre><dd><br />
This method returns the mail information which is placed into the
the finger command.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
pname - the name of the player<br />
<br />
<dd><b>Returns:</b>
<br />the function mail string
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="folder_filename">
folder_filename</a><pre class="autodocfuncdef">
string folder_filename(string name)
</pre>
<dt class="autodocfuncname"><a name="format_date">
format_date</a><pre class="autodocfuncdef">
string format_date(int x)
</pre><dd><br />
This formats the date as needed by the mailer object.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
x - the date to format<br />
<br />
<dd><b>Returns:</b>
<br />the new date
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="new_mail">
new_mail</a><pre class="autodocfuncdef">
string new_mail(string pname)
</pre><dd><br />
This method returns a string saying if the player has new mail or not.
This is what is used when the player first logs on.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
pname - the name of the player<br />
<br />
<dd><b>Returns:</b>
<br />the new mail string<br /><br />
<dd><b>Example:</b>
<br/><pre>str = MAIL_HANDLER->new_mail(this_player()->query_name());
</pre><br /></dl>

<dt class="autodocfuncname"><a name="query_do_this_last">
query_do_this_last</a><pre class="autodocfuncdef">
mixed * query_do_this_last()
</pre><dd><br />
This method returns the call back fuinction to use when
the mailer has finished. ({ ob, func })<br />
<br /><dl>
<dd><b>Returns:</b>
<br />the call back function
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_folders">
query_folders</a><pre class="autodocfuncdef">
string * query_folders(string pname)
</pre><dd><br />
This method returns the list of folders associated with the player.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
pname - the player name<br />
<br />
<dd><b>Returns:</b>
<br />an array containing the folder names
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="read_mail">
read_mail</a><pre class="autodocfuncdef">
void read_mail(string str,
               string sub)
</pre><dd><br />
This method is the main entry point to the mailer.  It is
what is called to start up the system when a mailer is used.<br />
<br /><dl>
<dd><b>Example:</b>
<br/><pre>mailer = clone_object(MAIL_HANDLER);
mailer->read_mail();
</pre><br /></dl>

<dt class="autodocfuncname"><a name="set_do_this_last">
set_do_this_last</a><pre class="autodocfuncdef">
void set_do_this_last(mixed * bing)
</pre><dd><br />
This method sets the call back fuinction to use when
the mailer has finished. ({ ob, func })<br />
<br /><dl>
<dd><b>Parameters:</b><br />
bing - the call back function
<br />
<br />
<br /></dl>

</dl>
[an error occurred while processing this directive]

