adding mailer function. added back button.