Refactor configuration settings for sending email