MailSendSidedoor.mesa
Copyright Ó 1990, 1991 by Xerox Corporation. All rights reserved.
Willie-Sue, February 14, 1990 5:05:12 pm PST
Willie-s, August 2, 1991 11:19 am PDT
Operations for sending electronic mail messages.
DIRECTORY
Rope USING [ROPE],
MailBasics USING [RNameList],
MailSend USING [MailSendHandle];
MailSendSidedoor: CEDAR DEFINITIONS
~ BEGIN
ROPE: TYPE ~ Rope.ROPE;
AbortSendProc: TYPE = PROC[msH: MailSend.MailSendHandle, lastTime: BOOL]
RETURNS [abort: BOOL];
MailSendSidedoorProcsRef: TYPE = REF MailSendSidedoorProcs;
MailSendSidedoorProcs: TYPE = RECORD [
which: ATOM,
SendWithAbort: PROC[msH: MailSend.MailSendHandle, validate, sendEvenIfInvalidNames, allowDLRecipients: BOOL, abortSend: AbortSendProc]
RETURNS [sent: BOOL, failureReason: ROPE, invalidNames, dlsNotAllowed, fakeDls: MailBasics.RNameList]
];
SendWithAbort: PROC [msH: MailSend.MailSendHandle, validate, sendEvenIfInvalidNames, allowDLRecipients: BOOL, abortSend: AbortSendProc, transport: ATOM ¬ $any]
RETURNS [sent: BOOL, failureReason: ROPE, invalidNames, dlsNotAllowed, fakeDls: MailBasics.RNameList];
Send the message:
msH should hold the message to be sent.
If validate=TRUE then the message will only be sent if all names are valid.
allowDLRecipients=TRUE means the message will be sent is any recipients are Dl's
transport specifies the transport that the user wants.
calls abortSend several times and lastly just before doing the actual send
sent reflects if the message was actually sent or not.
failureReason indicates why Send failed (if sent = FALSE).
invalidNames will contain all name known to be invalid at posting time. validate controls whether invalidNames prevents sending or not.
NOTE: The message in msH is left undisturbed. You can call Send again, possibly with a different transport, if so desired (such as the first send failed).
May raise SendFailed
RegisterMailSendSidedoorProcs: PROC[newProcs: MailSendSidedoorProcsRef];
GetRegisteredSendSidedoorProcsList: PROC RETURNS[LIST OF MailSendSidedoorProcsRef];
in case anyone wants them
GetRegisteredMailSendSidedoorProcs: PROC[which: ATOM]
RETURNS[MailSendSidedoorProcsRef];
END.