update formatting of email, also bug fix to send email properly