Hello,
im trying to send an email test using PHP and it looks like it is correctly sent but it does not reach the "to" email.
Is there any limitation with the free hosting?
Here is the code im using:
<?php
// TEST OF THE MAIL SYSTEM USING PHP mail()
date_default_timezone_set('America/Los_Angeles');
echo date('l jS \of F Y h:i:s A');
$from = "primerusuario@ewayatest.x10host.com";
$to="ewayapruebas@gmail.com";
$mailbody="Test message sent (PST): \n" . date('l jS \of F Y h:i:s A');
$subject="Test of PHP mail()" ;
$headers = "Content-type: text/plain; charset=windows-1251 \r\n";
$headers .= "From: $from\r\n";
$headers .= "Reply-To: $from\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "X-Mailer: PHP/" . phpversion();
$resp = mail($to, $subject, $mailbody, $headers);
if( $resp ){
$outcome = "Mail sent" ;
} else {
$outcome = "Mail not sent";
}
print "\nThe mail system said: $outcome\n\n" ;
exit();
?>
im trying to send an email test using PHP and it looks like it is correctly sent but it does not reach the "to" email.
Is there any limitation with the free hosting?
Here is the code im using:
<?php
// TEST OF THE MAIL SYSTEM USING PHP mail()
date_default_timezone_set('America/Los_Angeles');
echo date('l jS \of F Y h:i:s A');
$from = "primerusuario@ewayatest.x10host.com";
$to="ewayapruebas@gmail.com";
$mailbody="Test message sent (PST): \n" . date('l jS \of F Y h:i:s A');
$subject="Test of PHP mail()" ;
$headers = "Content-type: text/plain; charset=windows-1251 \r\n";
$headers .= "From: $from\r\n";
$headers .= "Reply-To: $from\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "X-Mailer: PHP/" . phpversion();
$resp = mail($to, $subject, $mailbody, $headers);
if( $resp ){
$outcome = "Mail sent" ;
} else {
$outcome = "Mail not sent";
}
print "\nThe mail system said: $outcome\n\n" ;
exit();
?>