You're the kind of person who forgets a lot of crap, and you're looking for something to set Todo items in your iCal for you, while you're somewhere without actual access to your iCal.

Look no more.

Apple Mail allows you to set Rules on incoming mail. It has the standard action stuff of course -- move to folder, mark as junk, trash-because-I-don't-like-this-person, etc. But also one action that allows for some really interesting stuff: Run Applescript.

So I figured I could use that for some simple remote Todo-ing, via e-mail. I can send those from my phone if need be.

Now, there are a few scripts out there that will do similar things. I found, however, that they're all closed. No sources. For an applescript. They could be doing <i>anything</i> to your system, and you wouldn't know it. You might find your entire home directory empty after sending three todos. So here's an open one instead. It's fairly small so I'll just paste it:

tell application "Mail"
	-- What must the subject start with? This gets trimmed.
	set thePrefix to "TODO: "
	-- What calendar will we add the todo to?
	set theCalendar to "Home"
	set theMessages to (messages of inbox whose read status is false)
	repeat with mail in theMessages
		if the subject of the mail begins with thePrefix then
			set theSummary to trim_line(the subject of the mail, thePrefix) of me
			set theDescription to the content of the mail
			tell application "iCal"
				make new todo at the end of todos of (every calendar whose title = theCalendar) with properties {summary:theSummary, description:theDescription}
			end tell
			-- can't delete unread messages?
			set read status of the mail to true
			delete the mail
		end if
	end repeat
end tell

-- taken from and modified on trim_line(this_text, trim_chars) set x to the length of the trim_chars repeat while this_text begins with the trim_chars try set this_text to characters (x + 1) thru -1 of this_text as string on error -- the text contains nothing but the trim characters return "" end try end repeat return this_text end trim_line

Don't you love how Applescript looks? Anyway, paste in Script Editor, compile, notice it looks even better with colour and indenting, save the resulting script somewhere sane, and make a new Rule in Mail to process e-mails. The minimum I would recommend is a subject check on it beginning with 'TODO: '. Add other checks as you see fit. Last, set the action to 'Run Applescript' and point to the script (really? yes.)

Try it out and have fun.