I have apache2.4 web server with PHP on Debian server.

I noticed that my PHP mail() function doesn't send any mail. Looked at the spam folder as well.

I cleared all the mail logs on my server and tried to run the following command:

root@myvps:/usr/sbin# echo "Subject: sendmail test" | sendmail -v "myemail@gmail.com"
Mail Delivery Status Report will be mailed to <root>.

and through the command I still don't get any email, as well as empty logs:

enter image description here

Any idea why sendmail command and mail through php mail() don't actually send emails?

  • Have you inspected web server (php) log files? – AnFi Feb 15 at 11:49
  • I wrote that I'm trying to send mail via the command, so it's irrelevant. and yes I did - no errors from PHP side. – TheUnreal Feb 15 at 12:06

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.