email functionality bug fix and styling