[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: Automated mail packaging script?



 _____________________________________
 } In reply to Vicki Brown's message of 19/3/97
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|: Does anyone have or know of a script that will do the following (on a Mac,
|: using Eudora for Email):
|: 
|: for all files in directory / folder
|: 
|:     package the file into a MIME message and send to X address
|: 
|:     move file into a "sent" mail folder


       set myRecipient to "noone@nowhere"
       set myLocation to (path to startup disk as string)
       set myFolder to myLocation & "Text Files for Mail:"
       set sentMailFolder to myLocation & "Sent Mail:" -- note the colons!!
       set filesForMail to list folder myFolder
       repeat with f in filesForMail
         set nextOne to myFolder & f
         set messageText to read the nextOne
         tell app "Eudora"
           set myMessage to make message at end of mailbox "out"
           tell myMessage
             set field "to" to myRecipient
             set field "" to messageText
             queue
           end tell
         end tell
         tell app "Finder" to move alias nextOne to folder sentMailFolder
       end repeat
       
                             John
                           ~{9y=-~}
                             ³¢¦¿