Bela Posted October 8, 2002 Report Share Posted October 8, 2002 Hi all, this is just a volontary contribution to the community... I was surprised to see that there is no Restrospect Event Handler which send the mail report by the unix sendmail. I am far from being anything like expert in unix so I decided to make one and learn some things about unix. Here is a the resut if anybody wants to use it: 1) first of all you need to enable sendmail. You can find eg on www.osxhints.com the recipies how to do it for different versions of OSX. I will not repeat it here. 2) You need to modify the event handler. Below is the modified sendMail function. Note one difference, if you want to send to more than one email adresses you need to have property kMainGroup : "someone@here.there.com,otherone@elsewhere.com" that is a string rather than a list property kMainGroup : {"someone@here.there.com","otherone@elsewhere.com" } ( if you do not like this in one or two line you can probably modify my function to return to standard format) here is the modified sendmail function ****************************************** -- sendmail function for UNIX sendmail to sendMail given Subject:subj, myMessage:bodyText, recipientsList:reciplist if reciplist is {} or reciplist is "" or reciplist is {""} or bodyText is "" then return -- Nothing or no one to send to. set mail_text to "echo Subject:" & subj & return & bodyText set SendmailCommand to " |/usr/sbin/sendmail " set longtext to mail_text & SendmailCommand & reciplist set reciplist to reciplist as list do shell script longtext end sendMail ***************************************** good day for all Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.