• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Mail crashing on mail action when getting content
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Mail crashing on mail action when getting content (From: Alan Fairlie <email@hidden>)

  • Prev by Date: Re: strange behaviour of QT Player 7.5 when setting window bounds
  • Next by Date: Re: Tell Safari to Download pdf?
  • Previous by thread: Re: Mail crashing on mail action when getting content
  • Next by thread: Is Image Events working under Leopard?
  • Index(es):
    • Date
    • Thread