on 6/2/2000 12:06 PM, Matthew Tevenan at [EMAIL PROTECTED] wrote:

> This is possible with both Retrospect for Macintosh and Windows. See p. 193
> of the Retrospect 4.2 User's Guide for information on how to do this with
> AppleScript and Retrospect for Mac. See p. 12 of the Retrospect 5.1 User's
> Guide Addendum for information on how to do this with a batch file script
> and Retrospect for Windows.

I finally got around to twiddling with the event handler scripts (sure
enough, it's all right there in the manual!) and, noticing that all of the
email handlers required an email client application, decided to fix up a
script to work directly with Stalker Internet Mail Server. SIMS is Macintosh
freeware, and will quite happily accept and send a properly formatted text
file, so in reality all the script has to do is write to a text file. I
started with the Outlook Express script, and replaced the "sendMail"
function with the following (be careful of line wraps if you cut/paste):

-- sendmail function for Stalker Internet Mail Server.
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.
        copy (path to system folder as string) & "SIMS Folder:Submitted:" to
        -- Generate an email alert message
        repeat with x from 1 to the length of reciplist
            -- Skip blank entries in the recipient list (if any)
            if item x of reciplist is not "" then
                copy item x of reciplist to msgTo
                -- Put the desired return address here
                copy "[EMAIL PROTECTED]" to msgFrom
                -- Write a text file that SIMS will pick up and deliver
                set mailFile to mailFolder & (random number)
                open for access file mailFile with write permission
                write "To: " & msgTo & cr & "From: " & msgFrom & cr & 
                    "Subject: " & subj & cr & cr & bodyText 
                    to file mailFile starting at (get eof file mailFile)
                close access file mailFile
            end if
        end repeat
    on error errMsg number errNum --Unable to send msg but still continuing
    end try
end sendMail


Jon L. Gardner '89, Computer Systems Manager <mailto:[EMAIL PROTECTED]>
Texas A&M University Dept. of Food Services <http://food.tamu.edu/>
Tel 979.458.1839 * Fax 979.845.2157 * Hip 979.229.4323
PGP public key available at <http://food.tamu.edu/pgp/jon.html>

To subscribe:    [EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Archives:        <http://list.working-dogs.com/lists/retro-talk/>
Problems?:       [EMAIL PROTECTED]

Reply via email to