Answer the question
In order to leave comments, you need to log in
Not receiving mail on gmail?
If you send a letter from my [email protected] mailbox directly to gmail, it will come. And if through the verification script, then it gets into spam:
<?
ini_set( 'display_errors', 1 );
error_reporting(E_ALL & ~(E_NOTICE | E_STRICT));
$from = "[email protected]";
$to = "mррмр@gmail.com"; //сюда вписать ящик, на который нужно отправить письмо
$subject = "PHP Mail Test script";
$message = "This is a test to check the PHP Mail functionality";
$headers = "From:" . $from;
if (mail($to,$subject,$message, $headers))
echo "Test email sent";
if (mail($to,$subject,$message, $headers, 'f'.$from))
echo "Test email sent with extraParams";
?>
Answer the question
In order to leave comments, you need to log in
In my case, it was necessary to register the domain in \etc\postfix\main.cf and everything worked, the postfix mail server was installed.
Obviously, because you send "directly" by logging in to Google's SMTP, and from a script - from your server, probably also SPF / DKIM / reverse zone is not configured.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question