added function to email configuration