SimpleMailerTest.mesa
Copyright Ó 1992 by Xerox Corporation. All rights reserved.
Doug Terry, July 24, 1990 5:07 pm PDT
DIRECTORY
Commander, Rope, SimpleMailer;
SimpleMailerTest: CEDAR PROGRAM
IMPORTS Commander, SimpleMailer
~ BEGIN
SendCmd: Commander.CommandProc ~ {
[cmd: Commander.Handle] RETURNS [result: REF ANY ← NIL, msg: ROPE ← NIL]
sent: BOOL;
failureReason: Rope.ROPE;
[sent, failureReason] ¬ SimpleMailer.SendMessage[from: NIL, to: LIST[[ns: $xns, name: "Terry"]], cc: NIL, subject: "Test message", otherHeader: NIL, body: "This is only a test.", validate: TRUE, sendIfValidateFails: FALSE, credentials: NIL];
msg ¬ IF NOT sent THEN failureReason ELSE "sent test message";
};
Commander.Register["TestSimpleMailer", SendCmd, "Send a test message using simple mailer."];
END.