here you go 🙂
$email = trim($_REQUEST['txtEmail']);
$email = htmlspecialchars($email, ENT_QUOTES);
$to = $email;
$title = "MY DOMAIN Registration";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$tmp = get_rand_id(24);
$query = "SELECT max(user_id) from phpbb_users";
$result = mssql_query($query,$link);
$b_row = mssql_fetch_array($result);
$userID = $b_row['0'];
$random = $tmp . $userID;
$message = "Hello $username, <br> In order to activate your account please click on the following link.<br><p><a href=http://www.xxxxxxxxx.com/activate.php?city=$city2&code=$random>http://www.xxxxxxxx.com/activate.php?city=$city2&code=$random</a><br><p>Thank You<br>xxxxxxx Staff\r\n";
mail($to,$title,$message,$headers);