How check mail blocked or not in php.ini in cpanel

To check if mail is blocked or not in PHP.ini in cPanel, you can follow these steps:

  1. Log in to your cPanel account.
  2. Click on the "File Manager" icon.
  3. Navigate to the "public_html" or "www" directory (depending on your setup).
  4. Look for the "php.ini" file and click on it to open it.
  5. Scroll down to the "mail" section, which should be around the middle of the file.
  6. Check for the following lines:
    ; For Unix only. You may adjust this value if your mail server complains about it
    ; It is advised to keep this value executeable, except for FPM/FastCGI
    ; When you modify this value, ensure you update it in both the 'php.ini'
    ; and the 'php-fpm.conf' files. (PHP 5.3.3-14-g675f5f5)
    mail.add_x_header = On
    mail.force_extra_headers = On

    If these lines are commented out (i.e., they start with a semicolon ";"), then mail is not blocked. If they are not commented out, then mail may be blocked.

Alternatively, you can also check the "mail" section in the "phpinfo()" output. To do this:

  1. Create a new PHP file (e.g., "test.php") in the "public_html" or "www" directory.
  2. Add the following code to the file:
    <?php
    phpinfo();
    ?>
  3. Save the file and upload it to your server.
  4. Access the file in your browser by visiting "http://yourdomain.com/test.php" (replace "yourdomain.com" with your actual domain name).
  5. Scroll down to the "mail" section in the output. If mail is blocked, you should see a message indicating that it is blocked.

Note that the "mail" section in the "phpinfo()" output may not always reflect the actual mail settings, so it's recommended to check the "php.ini" file as well.