<<>> <> <> <> 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.