[Package Index | Mudlib Index | Effect Index]

File /obj/handlers/mailer_new.c

The mailer handler object. This is used to send mail and do other stuff related to mail. The new mailer object ! *shiver* Thanks to Wodan and Pinkfish for ideas and help. By Turrican@Discworld, May 1995.

Written by Turrican

Started May 1995

Includes

This class includes the following files /include/player_handler.h, /obj/handlers/mail.h, /include/nroff.h and /include/mime.h

Class Index

Method index

Public Functions

These are functions that everyone can access.

do_mail_message
varargs int do_mail_message(string to,
                            string from,
                            string subject,
                            string ccs,
                            string body,
                             int,
                            string only_to,
                            int flag)

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.

Parameters:
to - Who it is to
from - Who it is from
subject - The subject of the message
ccs - The carbon copy recipients
body - The body of the message
only_to - Only mail to the to address
flag - Prevent this_player() from getting the messages if flag != 0

Example:
MAILER->do_mail_message( "pinkfish", "gumboot", "killer tomato", "",
         "The grass was greener yesterday,\nYours\nGumboot." );

finger_mail
string finger_mail(string player)
format_date
string format_date(int x)
new_mail
string new_mail(string player)
query_do_this_last
mixed * query_do_this_last()

This method returns the call back function to use when the mailer has finished.

Returns:
The call back function, format ({ ob, func })


read_mail
void read_mail(string recipient,
               string subject)

This function is the main entry point to the mailer. It is what is called to start up the system when a mailer is used.

Parameters:
recipient - If given, the mailer will start up by sending a message to the recipient
subject - What the subject should be in that case

Example:
mailer = clone_object( MAILER );
mailer->read_mail();

set_do_this_last
void set_do_this_last(mixed * func)

This method sets the call back function to use when the mailer has finished.

Parameters:
func - The call back function, format ({ ob, func })


status_symbol
string status_symbol(int status)

Classes

These are nice data types for dealing with... Data!