first working version of email being sent to database