Results 1 to 3 of 3

Thread: PHP mail() not delivering mail

  1. #1
    Join Date
    Sep 2021
    Beans
    1

    PHP mail() not delivering mail

    Hi, I'm new to web development/php, so this may be a simple mistake. I am using Apache2 on Ubuntu. Added: '/usr/lib/sendmail -t -i' to sendmail_path in php.ini. The attachment includes the basic mail() function call I used, and it always returns 'true' indicating that the message was accepted for delivery and the logs confirm. However, the email is never sent. How do I get it to actually deliver the mail? Thanks for any help in advance.
    Attached Images Attached Images

  2. #2
    Join Date
    Jan 2017
    Beans
    209

    Re: PHP mail() not delivering mail

    From here: https://www.php.net/manual/en/function.mail.php
    Returns true if the mail was successfully accepted for delivery, false otherwise.

    It is important to note that just because the mail was accepted for delivery, it does NOT mean the mail will actually reach the intended destination.
    Have you checked your MTA logs?

  3. #3
    Join Date
    Oct 2005
    Location
    Lab, Slovakia
    Beans
    10,442

    Re: PHP mail() not delivering mail

    Divide and conquer: Try debugging the problem using the mail command in a terminal. That may give you more meaningful error messages.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •