Monday, November 08, 2010 at 12:01 AM.
system.verbs.apps.Eudora.examples.formResponse
on formResponse (templatename) { local (text = string (user.Eudora.templates.[templatename])); local (x = Eudora.getCurrentMessageObject ()); local (subject = Eudora.getMessageSubject (x)); local (sender = Eudora.getMessageSender (x)); local (sentat = Eudora.getMessageDate (x)); local (greetings); bundle { <<set greetings string local (day, month, year, hour, minute, second); date.get (clock.now (), @day, @month, @year, @hour, @minute, @second); if hour < 12 { s = "Morning"} else { if hour < 19 { s = "Afternoon"} else { s = "Evening"}}; greetings = "Good " + s}; text = string.replaceAll (text, "<greetings>", greetings); text = string.replaceAll (text, "<subject>", subject); text = string.replaceAll (text, "<date>", sentat); text = string.replaceAll (text, "<user>", user.prefs.name); text = string.replaceAll (text, "<org>", user.prefs.organization); text = Eudora.ucmds.massageText (0, 60, text); if not (subject beginsWith "Re:") { subject = "Re: " + subject}; Eudora.newOutgoingMessage (sender, user.prefs.mailaddress, subject, text)}
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.