MailMessage.mesa
Copyright Ó 1989, 1991 by Xerox Corporation. All rights reserved.
Willie-Sue, November 27, 1989 1:16:24 pm PST
Willie-s, December 10, 1991 2:26 pm PST
DIRECTORY
IO USING [STREAM],
MailBasics USING [Timestamp],
MailRetrieve USING [Handle],
MailSend USING [MailSendHandle],
Rope USING [ROPE];
MailMessage: CEDAR DEFINITIONS
~ BEGIN
Read or Send one message, doing any formatting or attachemnt processing
STREAM: TYPE ~ IO.STREAM;
ROPE: TYPE ~ Rope.ROPE;
Retrieving
ReadOneMessage: PUBLIC PROC [handle: MailRetrieve.Handle, timeStamp: MailBasics.Timestamp, sender: ROPE, stream: IO.STREAM ¬ NIL]
RETURNS [m, formatting: ROPE ¬ NIL, bodyLength, formatLen, formatPos: INT ¬ 0];
If stream is not NIL, writes the retrieved message on stream, otherwise returns the ropes m & formatting, which are the text and formatiing parts of the message.
ReadOneMessageX: PUBLIC PROC [handle: MailRetrieve.Handle, timeStamp: MailBasics.Timestamp, sender: Rope.ROPE, stream: IO.STREAM ¬ NIL]
RETURNS [m, formatting: Rope.ROPE ¬ NIL, bodyLength, formatLen, formatPos: INT ¬ 0];
If stream is not NIL, writes the retrieved message on stream, otherwise returns the ropes m & formatting, which are the text and formatiing parts of the message; this version does NOT delete the leading '\r of the plaintext part of a tioga formatted message.
Sending
SendOneMessage: PROC [msH: MailSend.MailSendHandle, to, cc, fullText, formatting: ROPE, validateFlag: BOOL, transport: ATOM];
Send one message.
END.