Title: Re: new SPAMCOP script for Entourage?
Your script is pretty much the same as mine...except I don't move the messages. Not a bad idea.

With my script, my own experience is that the source was not getting sent thru with HTML code, just the text; I've fixed that. I've added a line that will delete attachments, if any, just to play safe.

property spamAddr : "[EMAIL PROTECTED]"
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"
    activate
    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 itsHTML to has html of theMsg is true
            try
                delete attachments of theMsg
            end try
            set src to (source of theMsg) as text
            make new outgoing message at out box folder with properties ¬
                {content:src, subject:"Spam report", recipient:spamAddr, has html:itsHTML}
        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: Steven Fisher <[EMAIL PROTECTED]>
> Reply-To: "Entourage:mac Talk" <[EMAIL PROTECTED]>
> Date: Mon, 17 Dec 2001 16:09:54 -0800
> To: Entourage mac Talk <[EMAIL PROTECTED]>
> Subject: Re: new SPAMCOP script for Entourage?
>
> on 12/14/01 9:58 PM, Harry (lists) at [EMAIL PROTECTED] wrote:
>
>> Now that SpamCop allows reporting by sending junk mail sources directly to
>> an individualized address, has anyone modified the original spamcop script
>> to automatically send an appropriate message, instead of opening up IE to
>> the spamcop page?
>
> Yes. I have a LART tool that does exactly that that I’ve used daily for
> about a month.
>
> Basically, I reroute all of my junk mail into a special folder. I review it
> quickly there and remove anything that isn't junk. Then I run this script. I
> don’t care about sending attachments; I’ve never gotten a spam with an
> attachment of significant size. Most spammers like to get the images/etc
> from a bugged URL.
>
> You’ll have to change the address ([EMAIL PROTECTED]) to yours, and the
> folder paths since you probably don’t use the structure I do. You’ll also
> need an incoming rule to route junk to the spam folder, and probably an
> incoming rule to route SpamCop’s autoacks to a folder.
>
> tell application "Microsoft Entourage"
>   activate
>   copy the messages of folder "New" of folder "Spam" of folder "Inbox" to
> theMessages
>   repeat with theMessage in theMessages
>       copy the source of theMessage to theSource
>       copy (make new outgoing message with properties {subject:"Spam
> report", content:theSource, recipient:{address:"[EMAIL PROTECTED]",
> recipient type:to recipient}}) to theNewMessage
>       send theNewMessage
>       set the read status of theMessage to read
>       move theMessage to folder "Reported" of folder "Spam" of folder
> "Inbox"
>   end repeat
> end tell
>
>

Reply via email to