Re: Scripting Apple Mail to Send Again
Re: Scripting Apple Mail to Send Again
- Subject: Re: Scripting Apple Mail to Send Again
- From: Philip Aker <email@hidden>
- Date: Wed, 26 Nov 2008 05:24:48 -0800
On 2008-11-25, at 22:51:54, James Cook wrote:
… but how do you get properties of an existing message and send it?
To get the properties of a message from the Sent mailbox use:
tell application "Mail" properties of message 1 of sent mailbox end tell
This will show you that the body of the message is contained in the 'content' property. Normally you will want to identify the previously sent message by some other criteria though because its index can change. The most direct is to use the 'message id' property. Using a whose clause will return a list of messages from which you can subsequently choose the best match.
tell application "Mail" every message of sent mailbox whose subject contains "Finite State Machine" end tell
Philip Aker
Democracy: Two wolves and a sheep voting on lunch.
|
_______________________________________________
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