Re: scripting 'mail' from OS X
Re: scripting 'mail' from OS X
- Subject: Re: scripting 'mail' from OS X
- From: cricket <email@hidden>
- Date: Sun, 17 Mar 2002 17:54:35 -0800
On Sunday, March 17, 2002, at 12:09 PM, Gerd wrote:
i am trying for example to delete messages in a folder (mailbox).
In Claris Emailer following worked fine:
tell application "Claris Emailer"
activate
open folder "backmails"
open first message of folder "backmails"
get content of first message of folder "backmails"
set y to result
delete first message of folder "backmails"
close front window
end tell
But in 'mail' i did not find out how it works. I allways get error
messages, for example:
mailbox 'backmail' does not understand the open message
or something like
scripterror no.3
In Mail, all mailboxes belong to accounts, so that's part of the problem.
Also, not everything you're trying to do here is possible in Mail yet,
like the opening of messages in the UI or deleting messages. But, this
script should work for you:
tell application "Mail"
set theMessage to first message of mailbox "backmails" of account
"Personal Mailboxes"
set y to content of theMessage
end tell
This will set y to the content of the first message in this particular
mailbox.
Are there anywhere samplescripts how to work with 'mail' ?
There are some samples scripts on your boot volume here:
/Applications/AppleScript/Example Scripts/Mail
- cricket
----->
Software Entomologist/Mail for Mac OS X email@hidden
---------->
Your life. To go.
_______________________________________________
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.