DIRECTORY Rope USING [ROPE], MailTransportP17V5, MSBasics USING [BodyPartType, RName], XNS USING [Address, unknownAddress]; MSSend: CEDAR DEFINITIONS ~ BEGIN ROPE: TYPE ~ Rope.ROPE; Handle: TYPE = REF; InvalidNameList: TYPE = MailTransportP17V5.InvalidNameList; Create: PROC RETURNS [handle: Handle]; SendFailed: ERROR [why: Rope.ROPE, notDelivered: BOOL] ; StartSendInfo: TYPE = { ok, badPwd, badSender, badReturnTo, allDown }; SetPostingServer: PROC [handle: Handle, server: XNS.Address ¬ XNS.unknownAddress]; StartSend: PROC [handle: Handle, senderPwd: ROPE, sender: MSBasics.RName, returnTo: MSBasics.RName ¬ NIL] RETURNS [StartSendInfo]; AddRecipient: PROC [handle: Handle, recipient: MSBasics.RName]; StartItem: PROC [handle: Handle, type: MSBasics.BodyPartType]; AddToItem: PROC [handle: Handle, buffer: ROPE]; Send: PROC [handle: Handle, validate, allowDLRecipients: BOOL] RETURNS [sent: BOOL, invalidNames: InvalidNameList]; Abort: PROC [handle: Handle]; END. > MSSend.mesa Copyright Σ 1988, 1991 by Xerox Corporation. All rights reserved. Doug Terry, November 11, 1988 12:23:03 pm PST Wes Irish, December 21, 1988 4:09:30 pm PST Willie-Sue, December 30, 1988 4:41:33 pm PST Willie-s, December 10, 1991 5:16 pm PST Operations for sending electronic mail messages to XNS mail servers. This interface is modeled after GVSend to ease the transition... These defs allow clients to inject messages into the XNS mail system. They are designed so that they can be used by multiple processes creating different messages; the state of creation of a single message is represented by a "Handle". The interface is also designed so that it may be implemented either by transmission over the network to a remote mail server, or by calls on a local mail server. For any one Handle, the following calls must be made in the order: StartSend, AddRecipient, AddRecipient, AddRecipient, . . . StartItem, (AddToItem, AddToItem, . . .), StartItem, (...), . . . Send Abort may be called at any point to abandon the sequence. A Handle may be re-used. "Abort" happens implicitly if needed sometime after the last reference to the Handle goes away. "StartSend" raises no signals that may be caught by the client. The ERROR "SendFailed" may be raised by any of AddRecipient, StartItem, AddToItem, or Send if some communication failure occurs. If it is raised, the client should generally catch it, go back to the start of the message, and re-call "StartSend". "StartSend" will then attempt to find a better mail server to talk to. Only when "StartSend" returns "allDown" is it not possible to send the message. The client may want to inform the user if this re-try mechanism has been invoked. Sets the posting server for the particular handle. If server = unknownAddress then posting is done to the "best-choice" available server (the default for the handle when created). Any address other than unknownAddress specifies a particular server for posting -- if that server is not available you will get "allDown" (from operations that return such). Starts a message. If "returnTo" is NIL, the sender name is used as return-to name. If "sender" = NIL then the currently logged in user is used as the sender. Adds to the recipient list. Start a message body part. Add the data to the current message body part. Send the message. If validate=TRUE then the message will only be sent if all names are valid. Any invalid names will be returned in invalidNames. "sent" reflects if the message was actually sent or not. May raise SendFailed Abandon the message. May be called at any time. Κ΅–(cedarcode) style•NewlineDelimiter ™codešœ ™ Kšœ Οeœ7™BKšœ*Οk™-Kšœ+™+K™,K™'—K˜Kšœ3žœP™†K™šž ˜ Kšœžœžœ˜Kšœ˜Kšœ žœ˜%Kšžœžœ˜$—K˜KšΡblnœžœž ˜Kšœž˜˜Kšžœžœžœ˜K˜Kšœ5žœΨ™K˜Kšœžœžœ˜K˜Kšœžœ&˜;K˜K˜KšΟnœžœžœ˜&K˜šœB™BKšœ ™ Kšœ/™/KšœA™AKšœ™—Kšœ΄™΄K˜š  œžœ žœžœ˜8KšœEžœυ™ΏKšœB™BKšœ#™#K˜—Kšœžœ3˜FK˜š œžœžœ žœ˜RKšœ†Οc]™γ—K˜š  œžœ˜ Kšœ žœ˜K˜Kšœžœ˜Kšžœ˜Kšœ$žœ<žœ9™ŸK˜K˜—š  œžœ-˜?Kšœ™K˜K˜—š  œžœ/˜>Kšœ™K˜—š  œžœžœ˜/Kšœ.™.K˜—š  œžœ/žœœžœžœ!˜sKšœΝ™ΝK™K˜—š œžœ˜Kšœ0™0—K™—Kšžœ˜K˜K˜—…—ΰΣ