SimpleMailerDoc.tioga
Carl Hauser, August 4, 1986 6:40:57 pm PDT
SimpleMailer
CEDAR 6.1 — FOR INTERNAL XEROX USE ONLY
SimpleMailer
An easy way to send mail from programs
Carl Hauser
© Copyright 1986 Xerox Corporation. All rights reserved.
Abstract: SimpleMailer provides a programmer's interface for sending a Grapevine message with a single procedure call.
Created by: Carl Hauser
Maintained by: Carl Hauser <CHauser.pa>
Keywords: mail, send, Grapevine
Commands: none
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

For Internal Xerox Use Only
Introduction
A convenient way for Cedar servers to communicate with their human administrators is for the servers to send mail. But doing so with GVSend is a pain because a complicated protocol must be obeyed to construct the message. SimpleMailer will do the GVSend protocol for you, given only the desired contents of the message fields.
How to use it
Load files for programs using SimpleMailer should contain
Install SimpleMailer
Client programs use the SimpleMailer interface, which contains a single procedure
SendMessage: PROC [from: ROPENIL, returnTo: RName ← NIL, to, cc: LIST OF RName ← NIL, subject: ROPENIL, otherHeader: ROPENIL, body: ROPENIL, validate: BOOLTRUE, sendIfValidateFails: BOOLFALSE]
RETURNS [sent: BOOL, info: SendMessageInfo]
and the type
SendMessageInfo: TYPE = {ok, invalidRecipient, noValidRecipients, badPwd, badSender, badReturnTo, allDown}
Called with all the defaults, SendMessage returns [FALSE, $noValidRecipients].
Credits
Credit for this goes mostly to the implementors of AlpineBackup, from whence the code was stolen.