moved email funcs to mail.go