Finally got the email notifications working

still needs to be integrated better