add headers to mail function