- added event hander to send mails