Support » Plugin: WP Mail SMTP by Mail Bank » Debug error for mail() function. Warning on functions.php lines 4834, 4837, 4840

  • Resolved Elle

    (@azjaleah)


    Emails are sending using the PhP mail() function. (I’d rather not set up SMTP with passwords for all email accounts on a multisite. So far, only one site is using this plugin.) But the System Debug shows this error message when I send a test:

    1Your Web Host provider may have blocked the use of mail() function on your server. Ask them to enable the mail() function to start sending emails.

    I have contacted the host and they have not turned off the mail()function. They said it would be easier to debug if they had the original actual error instead of the plugin’s explanation. Can you provide that?

    I have gone into the WHM and taken off the SMTP restrictions already (seen from another support topic). But this error is still persisting.

    There is also a warning showing on the System Info page. This is repeated about 7 times.

    Warning: fopen(/home/xxxxxxx/public_html/wp-content/plugins/1463522814): failed to open stream: No such file or directory in /home/xxxxxx/public_html/wp-includes/functions.php on line 4834
    
    Warning: fread() expects parameter 1 to be resource, boolean given in /home/xxxxxx/public_html/wp-includes/functions.php on line 4837
    
    Warning: fclose() expects parameter 1 to be resource, boolean given in /home/xxxxxx/public_html/wp-includes/functions.php on line 4840

    Yet when I compare the functions.php file to one that doesn’t use your plugin, the functions.php is exactly the same as this code on lines 4834 / 4837 / 4840

    4832-function get_file_data( $file, $default_headers, $context = '' ) {
    4833-// We don't need to write to the file, so just open for reading.
    4834-$fp = fopen( $file, 'r' );
    4835-
    4836-// Pull only the first 8kiB of the file in.
    4837-$file_data = fread( $fp, 8192 );
    4838-
    4839-// PHP will close file handle, but we are good citizens.
    4840-fclose( $fp );

    Any help would be appreciated. Even just an explanation.

Viewing 1 replies (of 1 total)
  • Plugin Author Varun Sharma

    (@contact-banker)

    Hi,

    The error “Your Web Host provider may have blocked the use of mail() function on your server. Ask them to enable the mail() function to start sending emails.” occurs when “sendmail_path” in php.ini file is not configured properly.

    You should ask your host to look at this setting. This should give them a clue.

    http://php.net/manual/en/mail.configuration.php#ini.sendmail-path

    For errors on System Info Page, please send us a screenshot of the System Info Page.

    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘Debug error for mail() function. Warning on functions.php lines 4834, 4837, 4840’ is closed to new replies.