The mail function works, but in fact the letter did not come. Why?

PHP 7.2.10
During the test:
if (mail("my@mail.com", "TEST SUBJECT", "TEST BODY")) {
 echo "Mailing system works!";
}
else {
 echo "Failure, the mail system doesn't work, try again!";
}


The script returns the Mail system works!"
But in fact the letter did not come. Why?
March 12th 20 at 08:02
1 answer
March 12th 20 at 08:04
Of mana about mail:
Returns TRUE if the message was accepted for transmission, FALSE otherwise.
It is important to note that the fact that the letter was accepted for transmission does NOT mean that it reached the recipient.
At least you have a mail server configured on the server? Look what writes to /var/log/mail.*
@Erling_Stroman, auth failed not suggest anything to you? - margare commented on March 12th 20 at 08:07
sendmail want to configure, you must enter the settings of your account from which to send messages. Otherwise, he puts the letter in the file. - Brandyn commented on March 12th 20 at 08:10

Find more questions by tags PHP