code factoring implemented by abstracting mail config variables to config/email.php