SMTPGVSend.mesa
Last Edited by: HGM, April 9, 1984 7:04:45 pm PST
Last Edited by: DCraft, November 28, 1983 3:09 pm
Last Edited by: Taft, January 3, 1984 2:22 pm
John Larson, July 20, 1987 9:22:02 pm PDT
DIRECTORY
SMTPDescr USING [Descr],
Rope USING [ROPE];
SMTPGVSend: CEDAR DEFINITIONS = BEGIN
Connection: TYPE = REF ConnectionRep;
ConnectionRep: TYPE;
totalGvMsgsSent: INT;
totalGvBytesSent: INT;
Open: PROC RETURNS [conn: Connection];
SendItem: PROC [descr: SMTPDescr.Descr, recipList: LIST OF Rope.ROPE, conn: Connection];
! Failed
Use public Grapevine interfaces to forward the described mail item to Grapevine.
Close: PROC [gvStream: Connection];
The "connection" is really just a storage handle, so close is unnecessary.
Failed will be raised by SendItem if it is unable to send the item completely successfully (e.g. one of the recipients was unknown). The withItem result indicates what the client should do with the item. In the case of retryLater and putOnBadQueue, reason is a failure reason and should be noted with the item; in the case of returnToSender, reason should be included in the return text preamble. ProblemWithGV indicates whether the problem was with the Grapevine servers (thus, the sending of further items should be delayed) or with the specific item being sent. SendItem does the necessary logging.
Failed: ERROR [withItem: WithItemAction, reason: Rope.ROPE, problemWithGV: BOOL];
WithItemAction: TYPE = {retryLater, putOnBadQueue, returnToSender};
END.