added mailer and add mail function ro register