add link and code to mail template