Monday, November 08, 2010 at 12:01 AM.
system.verbs.apps.mailToTheFuture.addMessage
on addMessage (recipient, subject, bodytext, when) {
<<Changes
<<3/31/01; 7:00:20 PM by DW
<<Created. Send mailToTheFuture a SOAP message to create a new message in the queue to be sent at the indicated time.
<<4/1/01; 3:32:31 PM by DW
<<The parameter name for the message table was incorrect.
local (msgstruct);
new (tabletype, @msgstruct);
msgstruct.dateTime = when;
msgstruct.messageBody = bodytext;
msgstruct.receiverMailAddress = recipient;
msgstruct.subject = subject;
mailToTheFuture.init ();
local (params = {"username":user.mailToTheFuture.username, "password":user.mailToTheFuture.password, "msgstruct":msgstruct});
with mailToTheFuture.data {
return (soap.rpc.client (path, "addMessage", @params, server, port))}}
<<bundle //test code
<<dialog.alert (addMessage (user.prefs.mailaddress, "Test message", "This is a quick test of MTTF.", clock.now ()))
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.