added header to the mail function