Re: How to get previous recipients from Mail
Re: How to get previous recipients from Mail
- Subject: Re: How to get previous recipients from Mail
- From: Graff <email@hidden>
- Date: Mon, 15 Dec 2003 02:57:48 -0500
This will give you a list of address of recipients of the currently
selected messages in Mail:
----------------
set allRecipients to {}
tell application "Mail"
set theSelection to the selection
repeat with currentItem in theSelection
if (the class of currentItem is message) then
set theRecipients to every recipient of currentItem
repeat with currentRecipient in theRecipients
set theAddress to address of currentRecipient
if the (count of allRecipients) is 0 then
set allRecipients to {theAddress}
else
if (allRecipients does not contain theAddress) then
copy theAddress to the end of allRecipients
end if
end if
end repeat
end if
end repeat
end tell
----------------
- Ken
On Dec 15, 2003, at 12:29 AM, Jim Witte wrote:
Hi,
Can I get the list of previous recipients from Mail, either through
AS or by parsing some file in the Library/Mail directory? I'd like to
write a script that would send messages to various people, but not if
they're in the previous recipients list.
Jim Witte
email@hidden
Indiana University CS
_______________________________________________
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.
_______________________________________________
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.