Getting content of an HTML message in Mail
Getting content of an HTML message in Mail
- Subject: Getting content of an HTML message in Mail
- From: Christian Boyce <email@hidden>
- Date: Fri, 10 Dec 2004 19:00:22 -0800
Using Mail 1.3.9, OS X 10.3.6.
I am trying to get the content of a selected message. The message is formatted with HTML.
<x-tad-bigger>tell</x-tad-bigger> application "Mail"
<x-tad-bigger>set</x-tad-bigger> the_messages <x-tad-bigger>to</x-tad-bigger> <x-tad-bigger>the</x-tad-bigger> selection
<x-tad-bigger>repeat</x-tad-bigger> <x-tad-bigger>with</x-tad-bigger> a_message <x-tad-bigger>in</x-tad-bigger> the_messages
<x-tad-bigger>set</x-tad-bigger> the_subject <x-tad-bigger>to</x-tad-bigger> <x-tad-bigger>the</x-tad-bigger> subject <x-tad-bigger>of</x-tad-bigger> a_message
<x-tad-bigger>set</x-tad-bigger> the_content <x-tad-bigger>to</x-tad-bigger> <x-tad-bigger>the</x-tad-bigger> content <x-tad-bigger>of</x-tad-bigger> a_message
--do stuff here
<x-tad-bigger>end</x-tad-bigger> <x-tad-bigger>repeat</x-tad-bigger>
<x-tad-bigger>end</x-tad-bigger> <x-tad-bigger>tell
</x-tad-bigger>
I get the_subject just fine, but the_content shows "?" rather than the content of the message.
I am able to make this work (getting "source" rather than "content"):
<x-tad-bigger>tell</x-tad-bigger> application "Mail"
<x-tad-bigger>set</x-tad-bigger> the_messages <x-tad-bigger>to</x-tad-bigger> <x-tad-bigger>the</x-tad-bigger> selection
<x-tad-bigger>repeat</x-tad-bigger> <x-tad-bigger>with</x-tad-bigger> a_message <x-tad-bigger>in</x-tad-bigger> the_messages
<x-tad-bigger>set</x-tad-bigger> the_subject <x-tad-bigger>to</x-tad-bigger> <x-tad-bigger>the</x-tad-bigger> subject <x-tad-bigger>of</x-tad-bigger> a_message
<x-tad-bigger>set</x-tad-bigger> the_source <x-tad-bigger>to</x-tad-bigger> <x-tad-bigger>the</x-tad-bigger> source <x-tad-bigger>of</x-tad-bigger> a_message
--do stuff here
<x-tad-bigger>end</x-tad-bigger> <x-tad-bigger>repeat</x-tad-bigger>
<x-tad-bigger>end</x-tad-bigger> <x-tad-bigger>tell</x-tad-bigger>
but this gives me a lot of formatting to wade through (all I want is the information, not the formatting). Is there a way for me to get just the text, without the formatting, if the message is HTML?
Thanks--
--
Christian Boyce
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden