Getting the sent date of a person's email

I was wondering if a better applescripter could help me with this.

I’m looking to get the last date received for each user in a mailing list from the inbox of my mail.

Can someone give me a hint?

date received and sender are properties of a message which belongs to a mailbox (by name). The way to proceed then is to set a variable to the messages in the designated mailbox and loop through them to get the first item of the dates received (which is the last). e.g. for my mailbox called “ebayetc” which holds various kinds of receipts:

set mySenders to {"Eastlink <enotify@corp.eastlink.ca>", "Stairways Software Support <mailer@fastspring.com>"}
set someMessages to {} -- a holder for the lists
tell application "Mail"
	repeat with aSender in mySenders
		set end of someMessages to first item of (get date received of messages in mailbox "ebayetc" whose sender is aSender) -- first item in the list of dates received is the last one
	end repeat
end tell
someMessages --> {date "Sunday, April 26, 2009 2:20:33 PM", date "Thursday, December 9, 2010 1:30:26 PM"}

At that point you know from “mySenders” who, and from “someMessages” when. Easy enough to combine those lists or to make a text document from them.

NB: the email addresses of the senders have to be exactly as they appear in the emails – the whole thing.

Thanks Adam…this gives me an idea…much appreciated.