HTML Utilities

Showing help on 'receiving-mail'

Receiving Mail


By definition a recipient "receives" a mail message when its :receive_message verb is called with that message as an argument.

:new_message_num()
=> number that will be assigned to the next incoming message.
By default this returns the maximum of the message numbers appearing in
messages or .messages_going, incremented by 1. If the recipient is a player
then the value returned will be 1 higher if it conflicts with the player's
current message number for him/herself.

:receive_message(msg,sender)
By default this first calls this:new_message_num to obtain a message number to assign to the incoming message and then appends {num,msg} to this.messages.
`sender', the original sender, is supplied in case one wants different
action depending on who is sending the message (e.g., mail-gagging).
The return value should be an error or string if :receive_message is considered to have failed in some way. Otherwise, a number should be returned --- this number is given to any :notify_mail routines that are called and is expected to either be 0 or the number assigned to the incoming message.

Note that :receive_message can do arbitrary things, including resending the same message to a new destination. Hacking :receive_message to resend messages is different from using .mail_forward in the following respects
(1) the resent message is considered to be a distinct message having this
object as its "author" --- i.e., the From: line will necessarily be
different.
(2) since this "forwarding" is invisible to the mailsystem,
there is no protection against loops and multiple copies.



-- telnet://project-mongoose.net:7777 -- Mail us -- http://project-mongoose.net:7780/ --
-- Six users connected --