Replace Emails and HREFS with enclosing HREFS
- by Nissan Fan
I have an Email body that used to be plain text, but now I've made it HTML. The emails are generated using a number of methods and none of them are easy to convert.
What I have is:
Some content [email protected], some http://www.somewebsite/someurl.aspx.
What I'd like to do is create a function that automatically encloses all email addresses and all URLs within a string in HREF tags so that the HTML email reads properly in all email clients.
Does anyone have a function for this?