Code:
if ($result) {
$to = "$sanEmail";
$subject = "TextDeck - Account Activation";
$message = "$username, Thanks for registering at <a href='http://textdeck.x10host.com' title='TextDeck'>TextDeck</a>!\n
To activate your account please use the following link: <a href='http://textdeck.x10host.com/activation.php?username=$username&activation=$textstr'>Text Deck Account Activation</a>";
$from = "admin@textdeck.x10host.com";
$headers = "Content-type: text/plain; charset=windows-1251 \r\n";
$headers .= "From: $from\r\n";
$headers .= "Reply-To: $from\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "X-Mailer: PHP/" . phpversion();
mail($to,$subject,$message,$headers);
echo "Registration Successful, we have just sent an activation email!";
}else{
echo "Failed to sent email activation code";
}