Using AppleScript, I have "source of message" which the dictionary
describes as

    source  string  [r/o]  -- the RFC822 message source

Should that include the attachments as well?  I have found that (at least
in some cases) it doesn't.

Carl

...

Here's the complete AppleScript (used for reporting spam):

on run
        tell application "PowerMail"
                set mySpamCopAddress to {address:{display name:"SpamCop 
Reporting",
email address:"[EMAIL PROTECTED]"}, recipient type:to recipient}
                set theSpamMasterAddress to {address:{display 
name:"SpamMaster", email
address:"[EMAIL PROTECTED]"}, recipient type:bcc recipient}
                activate
                try
                        set theMessages to current messages
                        if (theMessages) is not {} then
                                repeat with theMsg in theMessages
                                        -- This is where we create the new 
message content:
                                        set newSubject to "SPAM: " & (subject 
of theMsg)
                                        set newContent to (source of theMsg)
                                        set newMsg to (make new message with 
properties ¬
                                                {content:newContent, 
subject:newSubject, recipient:
{theSpamMasterAddress}})
                                        -- {content:newContent, 
subject:newSubject, recipient:
{mySpamCopAddress, theSpamMasterAddress}})
                                        -- This is where I check for errors 
when I'm debugging:
                                        -- open newMsg
                                        send newMsg
                                        set the label of theMsg to 5
                                        set the status of theMsg to read
                                        move theMsg to mail trash
                                end repeat
                        else
                                display dialog "You must select a message."
                        end if
                on error errText number errNum
                        display dialog (errText & return & "(" & errNum & ")")
                end try
        end tell
end run


Reply via email to