• 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: Mail and Searching
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail and Searching


  • Subject: Re: Mail and Searching
  • From: Axel Luttgens <email@hidden>
  • Date: Mon, 28 Jul 2008 15:26:57 +0200

Le 28 juil. 08 à 14:15, Michelle Steiner a écrit :

On Jul 27, 2008, at 9:46 PM, Geoff Sheehan wrote:

Apart from iterating through each mail message in a mailbox, is it possible for Applescript to filter email messages, say on sender or recipient, and display the results in a message viewer?


I can't get it to show in a message viewer, but here's a way to display the subjects of the messages in a dialog:

tell application "Mail"
tell mailbox "Applescript"
choose from list (get subject of messages whose sender contains "Nebel")
end tell
end tell

Well, looks like it is possible to go somewhat further:

	tell application "Mail"
		messages of mailbox "Applescript" whose sender contains "nebel"
		tell (make new message viewer) to set visible messages to result
	end tell

In the same vein, when searching for a given recipient:

tell application "Mail"
messages of mailbox "Applescript" whose address of recipients contains "email@hidden"
tell (make new message viewer) to set visible messages to result
end tell


But, depending on the needs, wouldn't this be a job for a smart mailbox?

HTH,
Axel _______________________________________________
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
  • Follow-Ups:
    • Re: Mail and Searching
      • From: Michelle Steiner <email@hidden>
References: 
 >perhaps I'll ask again on the Mail scripting thing (From: "Charles Arthur, UKClimbing Editor" <email@hidden>)
 >Re: perhaps I'll ask again on the Mail scripting thing (From: "Michael J. Vinca" <email@hidden>)
 >Re: perhaps I'll ask again on the Mail scripting thing (From: Michelle Steiner <email@hidden>)
 >Re: perhaps I'll ask again on the Mail scripting thing (From: "Michael J. Vinca" <email@hidden>)
 >Re: perhaps I'll ask again on the Mail scripting thing (From: Michelle Steiner <email@hidden>)
 >Mail and Searching (From: Geoff Sheehan <email@hidden>)
 >Re: Mail and Searching (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: how do I retrive a podcast's URL
  • Next by Date: weird behaviour
  • Previous by thread: Re: Mail and Searching
  • Next by thread: Re: Mail and Searching
  • Index(es):
    • Date
    • Thread