Here's the code
include("class.phpmailer.php");
include("class.smtp.php");
function makeLink($string){
// make sure there is an http:// on all URLs
$string = preg_replace("/([^\w\/])(www\.[a-z0-9\-]+\.[a-z0-9\-]+)/i", "$1http://$2",$string);
//make all URLs links...