• 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
Mail Search surrogate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mail Search surrogate


  • Subject: Mail Search surrogate
  • From: Gil Dawson <email@hidden>
  • Date: Wed, 8 Apr 2009 22:42:14 -0700

Unhappy with the limitations of the Search feature in mail, I thought I'd try my hand at an AppleScript. For my first example, I'm looking for an exhaustive list of all messages which were either sent or received between BeginTime and EndTime... etc.

You know, the stuff Eudora was good at. :-(

A few questions:

1)	Has anybody done this already?

2)	How would you cycle through all messages?

2a)	Using Smile, the following program...

tell application "Mail"
	set myAccts to every account
	log "count of myAccts=" & (count of myAccts) -- 5
	repeat with anAcct in myAccts
		log "name of anAcct=" & name of anAcct -- looks right
		set AllBoxes to every mailbox of anAcct
		repeat with aBox in AllBoxes
			log "name of aBox=" & name of aBox  -- only 4?
		end repeat
	end repeat
end tell

...logs just four mailboxes,

"INBOX"
"Drafts"
"Sent Messages"
"Deleted Messages"

...how can I reference the other couple dozen mailboxes that I created?



2b) The .emlx files in ~/Library/Mail/ could be visited, but the folder structure is a bit complicated. Has anyone written a program to visit all these files?



2c)	The following program and some variations I tried...

set BeginDate to (date "Tuesday, March 31, 2009 10:00:00 AM")
tell application "Mail"
set AftMsgs to every message whose date received is greater than BeginDate
end tell

... all get an error message. This one gets:

Can't make every message whose date received > date "Tuesday, March 31, 2009 10:00:00 AM" into type reference.



Any suggestions?

--Gil
_______________________________________________
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 Search surrogate
      • From: Luther Fuller <email@hidden>
    • Re: Mail Search surrogate
      • From: Roger Howard <email@hidden>
    • Re: Mail Search surrogate
      • From: Michelle Steiner <email@hidden>
References: 
 >Re: Unicode Character in File Name (From: CYB <email@hidden>)
 >Re: Unicode Character in File Name (From: Luther Fuller <email@hidden>)
 >Re: Unicode Character in File Name (From: "Mark J. Reed" <email@hidden>)
 >Re: Unicode Character in File Name (From: Luther Fuller <email@hidden>)
 >Re: Unicode Character in File Name (From: Christopher Nebel <email@hidden>)
 >Re: Unicode Character in File Name (From: Luther Fuller <email@hidden>)
 >Re: Unicode Character in File Name (From: Christopher Nebel <email@hidden>)
 >Re: Unicode Character in File Name (From: "Mark J. Reed" <email@hidden>)
 >Re: Unicode Character in File Name (From: Doug McNutt <email@hidden>)

  • Prev by Date: Script to resend mail
  • Next by Date: Re: Mail Search surrogate
  • Previous by thread: Re: Unicode Character in File Name
  • Next by thread: Re: Mail Search surrogate
  • Index(es):
    • Date
    • Thread