Re: mail.app: where 's the "sent" mailbox of a mac account?
Re: mail.app: where 's the "sent" mailbox of a mac account?
- Subject: Re: mail.app: where 's the "sent" mailbox of a mac account?
- From: John Delacour <email@hidden>
- Date: Tue, 9 Sep 2003 00:32:38 +0100
- Mac-eudora-version: 6.1a2
At 7:35 pm +0200 8/9/03, Reinforced Darkness wrote:
trying to get a list of all sent messages in mail app. I have 2 pop
accounts and one mac acount
//`
tell application "Mail"
set boites_denvoi to {}
repeat with chaque in every pop account
set boites_denvoi to boites_denvoi & (every mailbox of chaque
whose name is "Sent Messages")
end repeat
repeat with chaque in every imap account
set boites_denvoi to boites_denvoi &
(every mailbox of chaque whose name is "Sent Messages")
end repeat
end tell
//
first block works fine, second returns nothing: actually the mac account
has Inbox, Deleted messages mailboxes but nothing else though my "sent
msg" box is full of sent messages using the mac acount.
The mailbox you are looking for is an element of the application and
not of the account. To understand why, you need certain psychiatric
skills to get under the skulls of the people responsible.
If you regard this mailbox as just another of your created mailboxes
you should have no problem.
If I run this script
tell application "Mail"
name of mailboxes whose name begins with "Sent"
end tell
I get a list of two identical items. Whether you get the same will
depend on the phase of the moon.
So to do what you want you will need to write something like this:
tell app "Mail"
set boites_denvoi to {}
repeat with _account in every imap account
set end of boites_denvoi to item 1 of (mailboxes whose name begins
with "Sent" and name contains name of _account)
end
end
JD
.
_______________________________________________
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.