In message <alpine.deb.2.02.1202281539320.9...@asgard.lang.hm>, da...@lang.hm writes:
>On Tue, 28 Feb 2012, John P. Rouillard wrote: >> In message <alpine.deb.2.02.1202281224180.4...@asgard.lang.hm>, >> da...@lang.hm writes: >>> I've got some alerts configured that call an external script to send an >>> e-mail. It would be much nicer if I could add newlines to the sting to >>> format the mail message. when I try putting \n in the sting, that is what >>> comes out literaly. >> >> I usually add the lines to a context to get the newlines then report >> the context into my program (or copy the context into a variable and >> use the variable). >> >> Also something like: >> >> action = eval %r (return "foo\nbar\nbaz"); > >what I've been trying is > >action = shellcmd /path/to/script "destination" "subject" \ >"message\nmoremessage" Yeah something like: action = empty mess; \ add mess message; \ add mess moremessage; \ copy mess %m; \ shellcmd /path/to/script "destination" "subject" "%m" or action = eval %m (return "message\nmoremessage"); \ shellcmd /path/to/script "destination" "subject" "%m" are what I would try. Alternatively rewrite your script to accpet the message on stdin and use: action = empty mess; \ add mess message; \ add mess moremessage; \ report mess /path/to/script "destination" "subject" which may be safer depending on what your messages are and how they are constructed. -- -- rouilj John Rouillard =========================================================================== My employers don't acknowledge my existence much less my opinions. ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Simple-evcorr-users mailing list Simple-evcorr-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users