Re: Mail...again!!! :-)
Re: Mail...again!!! :-)
- Subject: Re: Mail...again!!! :-)
- From: m <email@hidden>
- Date: Fri, 28 Dec 2007 23:33:16 -0800
Hi Michelle, thank you again for your help. I found the error, which was a really silly one.
set theMsgs to every message of mailbox "barbaric" whose id is 178 set theMsg to first item of theMsgs move theMsg to mailbox "Duplicate Emails"
Works..
...what I was doing was assigning "theMsgs" to a list, but in the next line not using that assignment. Must be tired. Also, not quite used to the tricky language of AS yet.
Thank you again and a great New year. Michael.
Here is the script that I am trying to use to move targeted emails.
set theMsgs to every message of mailbox "Foo" of account "Comcast" whose id is 18198 set theMsg to item 1 of mailbox "Foo" move theMsg to mailbox "Foo_Duplicates"
Error: Cannot get account "Comcast" Removing the account name gives an error "Cannot get mailbox "Foo"
And yes...these mailboxes exist!!
The error message is in error. Is the account a POP account or an SMTP account? If it is a POP account, the problem is that POP accounts evidently do not contain mailboxes; only SMTP accounts do.
Mailboxes also belong to message viewers and the application. But message viewer does not have a message property, although it does have a selected message property.
These work: tell application "Mail" mailboxes end tell
tell application "Mail" mailbox 1 end tell
tell application "Mail" mailbox "Applescript" end tell
tell application "Mail" tell message viewer 1 selected mailboxes end tell end tell
These don't:
tell application "Mail" tell message viewer 1 mailbox "Applescript" end tell end tell
tell application "Mail" tell message viewer 1 mailbox 1 end tell end tell tell application "Mail" tell message viewer 1 item 1 of selected mailboxes end tell end tell
tell application "Mail" tell message viewer 1 mailboxes end tell end tell
Maybe that will give you enough information to solve your problem.
--
|
_______________________________________________
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