I am learning php and mysql and I started a little home project to learn better and why not?
So I built a registration page that get all the informations fine, but it can't send the email to verify the account.
Here is the code to send emails:
//other code that is fine
$subject = "Signup | Verification";
$headers = "From: theemail@email.com \r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$message = '<html><body>';
$message.='<div style="width:550px; background-color:#CC6600; padding:15px; font-weight:bold;">';
$message.='Email Verification mail';
$message.='</div>';
$message.='<div style="font-family: Arial;">Confiramtion mail have been sent to your email id<br/>';
$message.='click on the below link in your verification mail id to verify your account ';
$message.="<a href='http://192.168.1.106/register/user-confirmation.php?username=$username&email=$email&confirmation_code=$rand'>click</a>";
$message.='</div>';
$message.='</body></html>';
mail($email,$subject,$message,$headers);
//other code that is fine
I'm a working with a LAMP in a virtual machine collegated with bridge that's why in the verification link there is an ip adress.