2.24.10. Checking the work of outgoing mail via PHP mail

  1. Specify the sender box in the settings outgoing mail.
  2. Build with filemanager or any FTPclient in root directory site file test.php with code like this:
    <?php
    error_reporting(E_ALL);
    ini_set('display_errors', '1');
    if (mail("mail_recipient", "Test mail", "Checking mail sent")) {
        echo "ok";
    } else {
        echo "error";
    }

    Attention! Instead mail_recipient be sure to substitute your mail.

  3. Run the created script by accessing it through the browser at an address like www.your.site/test.php.
  4. In the mailbox specified instead of mail_recipient, check for the presence of a letter that the test script should have sent.

If the program issued a message error or the mail was not delivered to the specified mailbox and you checked that the mail is not in the folder "Spam", contact us at technical support and provide a link to the file with which you tested mail.

If the letter came in an incomprehensible encoding, then replace in the script "Checking mail sent" on "Checking mail sending", "Content-type: text / html; charset = utf-8" and run it again.

Content