View the 'source' of the html generated and you will see either en error in the html generated by your code or the link missing. Then go back and debug your code.
As an aside I tend to use a template approach to html email when developing applications to send email. That way your php code only needs to worry about transient data like mailto: etc.