Re: Mail crashing on mail action when getting content
Re: Mail crashing on mail action when getting content
- Subject: Re: Mail crashing on mail action when getting content
- From: deivy petrescu <email@hidden>
- Date: Thu, 26 Jun 2008 08:23:41 -0400
On Jun 23, 2008, at 4:00, Alan Fairlie wrote:
The following script causes Mail to crash when a mail rule calls the
script.
It works fine if l remove - set theContent to content of item 1 of
theMessages.
Is this a bug or is there another way to get the content of an email
via a mail rule?
Thanks, Alan.
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
tell application "Mail"
set theSubject to subject of item 1 of theMessages
set theContent to content of item 1 of theMessages
set theText to "Subject: " & theSubject & return & "Content: " &
theContent
display dialog theText
end tell
end perform mail action with messages
end using terms from
Alan,
I'd recommend you make two changes in your script.
1. change "item 1 of theMessages" to "contents of item 1 of
theMessages".
2 set theContent to content of get properties of (content of item 1
of theMessages) ( same for thesubject by the way!).
HTH
Deivy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden