Mail fix

Fixed the mail issue
Changed the way notifications work.