First working version of email event parser