Just learned AppleScript yesterday and I'm still trying to hook up Mail.app with a Python script so that I can do regex matching with incoming messages for spam filtering.
One problem I have is "content of theMsg" (theMsg is a message matched by a rule) returns me an EMPTY string when the message is in HTML! If I use "source of theMsg" then for HTML messages it only gives me the sender of the messages!
Without this I can't match any incoming HTML messages, which, unfortunately, is the format that most junk mails nowadays are in.
Another question is, lots of these spam bastards encoded their HTML messages using characters such as   . I certainly can translate that back to originals and do matching, but I'm wondering if it's possible to send HTML message off to webkit and get back a translated message (without these encoded characters)?
Thx a lot!