Title: Re: Script for SpamCop?
I believe this will do what you want, not in quite the way you describe, but well enough. The contact it mentions setting up should have the spam report address you have from Spam Cop. Just compile the script in Script Editor and save it in your Entourage Script menu Items folder.

property spamAddr : ""
property deleteJunk : ""

if deleteJunk = "" then -- Set preference about deleting the messages
    set deleteJunk to ((button returned of (display dialog "Delete spam after reporting?" buttons {"Yes", "No"} ¬
        default button "Yes")) = "Yes")
end if
tell application "Microsoft Entourage"
    -- If the user has defined a contact called "SpamCop Full" or "SpamCop Quick", use that address
    try
        set spamAddr to contents of default email address of (get contact "SpamCop Full")
    on error
        try
            set spamAddr to contents of default email address of (get contact "SpamCop Quick")
        on error
            display dialog "Please define a contact called \"SpamCop Full\" or \"SpamCop Quick\""
            return
        end try
    end try
    if spamAddr = "" then
        display dialog "Unable to proceed."
        return
    end if
    set currentMessages to the current messages
    repeat with theMsg in the currentMessages
        my ProcessMsg(theMsg)
    end repeat
    display dialog "Spam report(s) placed in Out Box folder."
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}
            if deleteJunk then
                set read status of theMsg to read
                delete theMsg
                try -- Second delete to permanently delete it
                    delete theMsg
                end try
            end if
        else
            display dialog "No incoming message selected."
        end if
    end tell
end ProcessMsg


On or near 10/19/03 1:46 PM, Eddie Hargreaves at [EMAIL PROTECTED] observed:

> I use SpamCop, which involves sending offending spam messages as an
> attachment (not forwarding or redirecting). In order to do this, I create a
> new e-mail message and address it to SpamCop, then drag the window so it
> overlaps the main Mail window, click on the main Mail window and drag the
> offending message(s) to the new message window in the background, which it
> then puts in the attachment area as .eml files. Then I click back in the new
> message window and hit send.
>
> So, is there a script that could help shorten this process? For example, I
> would like to simply select the spam messages, go to the script menu and
> select a script named SpamCop which would do all of the above.
>
> I'm using Entourage X 10.1.4 on Mac OS X 10.2.8
>
> Eddie Hargreaves

--
Microsoft MVP for Entourage/OE/Word (MVPs are volunteers)
Allen Watson <[EMAIL PROTECTED]> Entourage FAQ site: <http://www.entourage.mvps.org/>
AppleScripts for Outlook Express and Entourage:
 <http://members.thinkaccess.net/[EMAIL PROTECTED]/Scripts/>
Entourage Help Pages: <http://www.entourage.mvps.org/>

Reply via email to