Apple's Mail strips quote characters from contents property
Apple's Mail strips quote characters from contents property
- Subject: Apple's Mail strips quote characters from contents property
- From: Tom Robinson <email@hidden>
- Date: Wed, 16 Jun 2004 18:16:42 +1200
Hi folks,
I'm getting into scripting Mail and have gotten stuck on quoted text in
its message contents.
I've created the following test script and placed it in
"~/Library/Scripts/Mail Scripts" so it appears in the Scripts menu.
When I run it on a message which contains quoted text in the body, Mail
strips off the quote characters.
using terms from application "Mail"
on perform mail action with messages theMessages
set ThisMessage to item 1 of theMessages
set a to content of ThisMessage
display dialog a
-- set b to source of ThisMessage
-- display dialog b
end perform mail action with messages
end using terms from
i.e. The actual message body (and the 'source' property) contains:
>> aaa
>
> bbb
ccc
Mail displays this with vertical bars:
| | aaa
|
| bbb
ccc
But the above AppleScript displays the 'content' as:
aaa
bbb
ccc
Mail's also stripping a leading space, though that's not such an issue
for me.
Any thoughts before I submit a bug?
Presumably my easiest workaround is to use the 'source' and just grab
from the double linefeed to the end (I'm batch processing 300 messages
at a time, so don't want anything too slow.)
Mail 1.3.8.
Thanks!
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.