I think the best script you can use for this would be
Live Notifier, however there are some other possible scripts out here too. Just note that any open/close notifier is based on session starts or endings which can be triggered on lots of ways by the Messenger protocol, and therefore you can never say if the person actually opened or closed the window.
And, never place your e-mail address on a forum without encrypting it to avoid spam bots finding it. If you want to let people e-mail you, type it like "user at hotmail dot com" which is lots harder for spam bots to capture. Unless you like to get junk mail...