Added some error handling
Added some error handling code
Merge pull request #3 from siddharthabose03/mail_notification

:green_heart: