I am trying to send simple html email using PHP mail().
The following code work fine
$headers = 'MIME-Version: 1.0' . "
";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "
";
If(mail('xyz@gmail.com', 'test mail', 'test<hr>this is a test mail', $headers)){
Echo 'OK';
} else{
Echo 'Not ok';
}
Problem: as soon as I put some specific url in the body the code still say its ok but email never received
If(mail('xyz@gmail.com', 'test mail', 'test<hr>this is a test mail from www.xyz.com', $headers)){
Echo 'OK';
} else{
Echo 'Not ok';
}
Can someone guide me whats the issue and how to fix it?