• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to get previous recipients from Mail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: How to get previous recipients from Mail
      • From: Michelle Steiner <email@hidden>
References: 
 >How to get previous recipients from Mail (From: Jim Witte <email@hidden>)

  • Prev by Date: Re: Why isn't Mail recordable?
  • Next by Date: Re: How to get previous recipients from Mail
  • Previous by thread: How to get previous recipients from Mail
  • Next by thread: Re: How to get previous recipients from Mail
  • Index(es):
    • Date
    • Thread