mail function

Hello, when i make the mail() function send mail to an email it just sends the “Hello”
it doesn’t send the colored text.[php]$Message = ‘Thank you for registering to prankvsprank.tk’;
mail($Email, ‘Registration Successful’, $Message);
$insert = mysqli_query($con, “INSERT INTO pvptk VALUES(’’,’$Username’,’$Password’,’$Email’,’$Favorite_Pet’)”);[/php]

[member=72855]812d[/member]

You need to set the content type to HTML, the code below should work for you.

[php]// Always set content-type when sending HTML email
$headers = “MIME-Version: 1.0” . “\r\n”;
$headers .= “Content-type:text/html;charset=UTF-8” . “\r\n”;
$Message = ‘Thank you for registering to prankvsprank.tk’;

mail($Email, ‘Registration Successful’, $Message,$headers);
$insert = mysqli_query($con, “INSERT INTO pvptk VALUES(’’,’$Username’,’$Password’,’$Email’,’$Favorite_Pet’)”);[/php]

Thank You!!!

Sponsor our Newsletter | Privacy Policy | Terms of Service