Title: Re: new SPAMCOP script for Entourage?
Sorry about the duplication; I was rushed and didn't check it over. For those still confused, I include the script again at the end of this message. I'll also post it to AppleScriptCentral.com.
As for setting the folder to which the message should be moved after sending it: No, I don't see any way to set that from a script, although there should be! I'll suggest it unless Paul pipes up and tells me I'm wrong. It would be easy enough, though, to set up an Outgoing Rule that says "if the recipient contains "spamcop.net" move to folder "SpamCop"".
Here is the script, just once this time:
property spamAddr : "SpamCop <email-address>"
if spamAddr = "SpamCop <email-address>" then
display dialog "Please edit the script and put your SpamCop address in the first line."
return
end if
if spamAddr = "SpamCop <email-address>" then return
tell application "Microsoft Entourage"
set currentMessages to the current messages
repeat with theMsg in the currentMessages
my ProcessMsg(theMsg)
end repeat
end tell
on ProcessMsg(theMsg)
tell application "Microsoft Entourage"
if class of theMsg is incoming message then
set src to (the headers of theMsg) & return & (the content of theMsg)
make new outgoing message at out box folder with properties ¬
{content:src, subject:"Spam report", recipient:spamAddr}
else
display dialog "No incoming message selected."
end if
end tell
end ProcessMsg
--
Microsoft MVP for Entourage/OE/Word
Allen Watson <[EMAIL PROTECTED]> XNS name: =Allen Watson
Applescripts for Outlook Express and Entourage: <http://homepage.mac.com/allenwatson/>
> From: Domenico Bettinelli <[EMAIL PROTECTED]>
> Reply-To: "Entourage:mac Talk" <[EMAIL PROTECTED]>
> Date: Mon, 17 Dec 2001 10:22:52 -0500
> To: "Entourage:mac Talk" <[EMAIL PROTECTED]>
> Subject: Re: new SPAMCOP script for Entourage?
>
> Thanks for the script, Allen, although it threw me at first because the last
> section was duplicated in your message. Anyway, I tried looking, but because
> I’m a scripting newbie I couldn’t figure out if you can set the folder the
> message should be moved to after it is sent rather than leave it in Sent
> Items. Is that possible in Applescript?
- Re: Unexpected quits (Both 9... Jerad Hoff
- Re: Unexpected quits (Both 9... Dan Crevier
- THANKS! [was Re: new SPAMCOP... Harry (lists)
- Re: new SPAMCOP script for E... Allen Watson
- Re: new SPAMCOP script for E... Harry (lists)
- Re: new SPAMCOP script for E... Allen Watson
- Re: new SPAMCOP script for E... Harry (lists)
- Re: new SPAMCOP script for E... Steven Fisher
- Re: new SPAMCOP script for Entourage? Allen Watson
- Re: new SPAMCOP script for Entourage? Domenico Bettinelli
- Re: new SPAMCOP script for Entourage? Allen Watson
- Re: new SPAMCOP script for Entourage? Paul Berkowitz
- Re: new SPAMCOP script for Entourage? Domenico Bettinelli
- Re: new SPAMCOP script for Entourage? Allen Watson
- Re: new SPAMCOP script for Entou... Domenico Bettinelli
