We use cookies
We use cookies to optimize our website. By continuing to browse the site, you agree to our use of cookies.
New design
Control panel
  • Русский
  • Українська
  • English
  • UAH
  • USD
  • RUB
  • EUR
  • 0-800-307-307 Hotline
  • +38 (044) 392-74-33 Kiev
  • +38 (057) 728-39-00 Kharkiv
  • +38 (056) 794-38-31 Dnipro
  • +38 (032) 229-58-93 Lviv
  • +38 (048) 738-57-70 Odessa
  • +38(093) 170-15-42  Life
  • +38 (067) 400-88-44 Kievstar
  • +1(888)393-24-51  USA, Toll free
  • +44(131)507-01-14  Great Britain
  • +7 (499) 348-28-61 Moscow

2.24.10. Checking the work of outgoing mail via PHP mail

To check the work of outgoing mail via mail, do the following:

  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:
    test.php
    <?php
    error_reporting(E_ALL);
    ini_set('display_errors', '1');
    if (mail("mail_recipient", "Test mail", "Checking mail sent")) {
        echo "ok";
    } else {
        echo "error";}

    Required instead mail_recipient 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 "Spam" folder, 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.