How to get formatted content of email?

I want to get the formatted content of an email message from so that I can feed it to wkhtmltopdf or princexml via stdin.

I know I can get the body of an email message using “content” or “source”.

I think the best way is to get the contents as raw HTML. Is this possible? Is it possible to get the body of an email, as HTML?

Nope. You’d have to get the source and parse it, unless there’s some magic spell to be found in AppleScriptObjC.


Yeah, you’d need to parse the source, I think.

1 Like

Developer of Mail Archiver here, which archives emails to a database or PDF. There is a lot of work involved in making html out of emails.

I’m curious… which app?
This one?: ‎Mail Archiver X Easy on the Mac App Store

This one?: