Trying to re-direct emails as plain text using Applescript. Code (inside) isn't working, any help would be great

1

I have users sending mail through Outlook which formats the text as Rich text. I'm trying to create script where a "catch-all" email address intercepts the email, converts it to plain text then send it to the user. I've got the Re-Direct working with some searching around, however the message body is still Rich Text. Is there a way I can modify the script below to achieve this:

tell application "Mail"

set AppleScript's text item delimiters to ""
set theRedirectRecipient to "intercept@mail.com"
set theRedirectSender to "Case manager"
set theMessages to the selection

repeat with thisMessage in theMessages

    tell application "Mail"

        set theRedirectedEmail to redirect thisMessage
        tell theRedirectedEmail

            if subject of thisMessage is "" then

                set subject of theRedirectedEmail to "Subject Was Empty"
            end if

            make new to recipient at beginning of to recipients with properties {address:theRedirectRecipient}
            delete bcc recipients
            delete cc recipients

        end tell

        set the sender of theRedirectedEmail to theRedirectSender
        #delay 1
        send theRedirectedEmail

    end tell

end repeat

end tell

user197937

Posted 2013-02-13T14:26:15.863

Reputation: 11

No answers