mail.app -- getting content of window when HTML

Our group has a Filemaker database tracking our workflow. I’ve been working on a script that would put the content, etc of the currently selected email into a Filemaker database along with a field for our project code.

That part works fine. Where I’m running into difficulty is if the email message content is anything other than plain text without attachements.

If it’s plain text with an attachment is shows a question mark where the attachment would be (which is ok…I can live with that.) However if the email is in HTML mode all I get is question marks. If I change the script to get “source of message” instead of “content of message” I get the HTML sourcecode for the message (which I think I might be stuck with) but I also get the raw text encoding of any attachments.

What I’m wondering is if anyone else has done this and might have some pointers to at least enable me to ignore attachements altogether and possible just grab the text of an HTML email.

Regards,
jerry

I think it might be a bug introduced with Pnather, at least that’s what I read on another Applescript forum

The only way I’ve ever been able to move an HTML page from Mail to anywhere else is to GUI script Select All and then Paste it somewhere else as rich text, usually Text Edit. Doesn’t always hold the formatting perfectly but atleast it’s all there, images, etc.