mailer settings added and bug fix