Keep emails alive

One feature that would make DT even more useful for me would be if emails would be “kept alive” inside of DT, i.e., would be recognised by DT as emails, to which one can reply etc.

I don’t know what Mac OS X offers in terms of frameworks, so that that wouldn’t entail including a whole email application, but a second-best solution that shouldn’t be too hard to build would be a special view for emails with buttons that pass reply / forward requests to Mail.app or whatever, no?

[ Actually, a small change to Import Selected Mail would already help me alot, namely having date, sender & subject as the title / filename of the imported text file, and not just the subject. That would ensure that the messages are sorted chronologically, and would be very helpful. Has anyone done something like this? I don’t speak AppleScript, but it looks like that change should be rather trivial (if you know which constructs Mail.app offers). ]

Cheers,
David.

OK, hacker’s honour didn’t let me rest: with a little help from the net (a lot actually, from here: fischer-bayern.de/applescrip … datum.html ), here’s what I cooked up.

In “Import Selected Mail”, add to the block inside >using terms from application “Mail”< the following lines:

          set theSender to sender of theMessage
	set theNameOnly to extract name from theSender
	set theDate to date received of theMessage
	-- process the date
	set derTag to text -2 thru -1 of ("0" & theDate's day)
	set MonatsListe to {January, February, March, April, May, June, July, August, September, October, November, December}
	repeat with i from 1 to 12
		if theDate's month = item i of MonatsListe then
			set MM to text -2 thru -1 of ("0" & i)
			exit repeat -- wenn true, wird die Schleife verlassen 
		end if
	end repeat
	set Jahr to ((year of theDate) as text)
	set dasDatum to Jahr & MM & derTag
	-- date processed		

then change the line

set theFileName to my makeFileName(theSubject)

to

set theFileName to my makeFileName(dasDatum & " " & theNameOnly & " " & theSubject)

That’s it. Now the title of messages will be “YYMMDD Sender Subject”, which means it sorts chronologically, and gives a little more information.

If there’s a simpler / better way to do that (which I’m sure there is), I’d like to hear it. And I’d still like to see real email integration…

Cheers,
David.