So when I submit my form, everything is stored in the database just fine, I had a really simple email that basically consisted of, ‘Hey thanks, this is your link’ kind of deal and I received that just fine. But now I’ve upgraded to using an HTML body instead and suddenly I’m not receiving the email, any idea why?
$to = $username;
$subject = 'Thanks for Registering on Dota Pub Stars!';
$message = '<html>
<head>
<title>Registration Successful!</title>
<link rel="stylesheet" src="http://www.sithhappens.net/css/style.css" />
</head>
<body class="bodybg">
<div id="registrationform">
<p class="success">Thanks for registering on Dota Pub Stars!</p>
<br />
<br />
<a class="button2" href="http://www.sithhappens.net/?key=' . $activation_key . '&username=' . $username . '&email=' . $email1 . '">Activate Account</a>
</div>
</body>
</html>';
$headers = "MIME-Version: 1.0 \r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "From: $from\r\n";
mail($to, $subject, $message, $headers);
your above code workin fine i check like this try to check $username value is email
my example
also check your SMTP settings is ok