Title: Re: Custom script
On 9/12/04 8:01 am, "Scott Haneda" <[EMAIL PROTECTED]> wrote:
> Here is a good one, I need a script that will be triggered from a rule, it
> will read the body of the email, which is in the format of
>
> Unsubscribe [EMAIL PROTECTED]
> Unsubscribe [EMAIL PROTECTED]
> Unsubscribe [EMAIL PROTECTED]
> Unsubscribe [EMAIL PROTECTED]
> Unsubscribe [EMAIL PROTECTED]
> ...
> Where each line is a unique email address, there is some cosmetic data in
> the email at the top and bottom, but if the script where to scan for every
> line that started with unsubscribe that would work.
>
> It needs to message those lines to add in the word "all" after the word
> unsubscribe and before the email address.
>
> Once it has "cleaned" those lines, take that data and forward it off to a
> special address, once forwarded, go ahead and delete the actual message it
> forwarded as well as the one that came in to generate all this.
Try this (you will have to put the right address for the forward in the appropriate line):
<http://tinyurl.com/54ze5>
If that URL doesn't work, here is the script in full:
-- Edit & Forward v1.0 (©9th December 2004)
-- an applescript for Microsoft Entourage
-- by Barry Wainwright <[EMAIL PROTECTED]>
-- written in response to a request from Scott Haneda <[EMAIL PROTECTED]>
-- on the Entourage:Mac mailing list
tell application "Microsoft Entourage"
-- get the first current message - will be a filtered message when script is run from a rule
set theMess to item 1 of (get current messages)
-- get the body of the message
set theContent to content of theMess
--preserve the TIDs and assign the new ones
set {oldTIDs, AppleScript's text item delimiters} to {AppleScript's text item delimiters, "unsubscribe"}
-- get the parts of the message separated by "unsubscribe"
set newContent to text items of theContent
-- set the replacement text
set AppleScript's text item delimiters to {"unsubscribe all"}
-- return the new text to the body of the message
set content of theMess to newContent as text
-- reset the saved TIDs so we leave everything as we found it
set AppleScript's text item delimiters to oldTIDs
-- forward the message
set fwdMessage to forward theMess to "[EMAIL PROTECTED]" without opening window and html text
-- send it
send fwdMessage
-- now, wait until it has finished sending
repeat while connection in progress
delay 2
end repeat
-- and tidy up again
delete {theMess, fwdMessage}
end tell
--
Barry Wainwright
Microsoft MVP (see http://mvp.support.microsoft.com for details)
Seen the All-New Entourage Help Pages? - Check them out:
<http://www.entourage.mvps.org/>
- Custom script Scott Haneda
- Re: Custom script Barry Wainwright
- Re: Custom script Scott Haneda
- Re: Custom script Barry Wainwright
- Re: Custom script Paul Berkowitz
- Re: Custom script Scott Haneda
- Re: Custom script Scott Haneda
- Re: Custom script Allen Watson
- Newbie Question Mark Falchook
- Re: Newbie Question Diane Ross
- Re: Newbie Question Mark Falchook
- Re: Newbie Question Rich Hansen
