Mail function issue fixed to fetch the mailer settings from configuration