added better email configuration