Commented to2
variable is working fine. But Gmail id
is not working.
When I'm executing this code then first condition is printing Yes
and second variable is printing No
:
$to = "info@ebitmoney.com";
//$to2= "enquiry@ebitmoney.com"; //this variable is working
$to2= "abhisekh.milkyway@gmail.com"; // this is not working
$subject = "HTML email";
$message = "hello";
$header = "From: abhishek@milkywayservices.com\r\n";
$header.= "MIME-Version: 1.0\r\n";
$header.= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$header.= "X-Priority: 1\r\n";
$send1=mail($to,$subject,$message,$header);
$send=mail($to2,$subject,$message,$header);
if($send1){
echo 'Yes';
}
else{
echo 'No';
}
if($send){
echo 'Yes';
}
else{
echo 'No';
}