• Resolved devchandra

    (@devchandra)


    Hello,

    So I am getting an error while submitting all the forms that I have put up on my website, I have enabled debugging mode and I am attaching the debug.log here for your reference.

    Screenshot: https://tinyurl.com/2cyunkpp

    Let me know if you require anything else from me, looking forward to your response.

    Best Regards,
    Dev.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Jair – WPMU DEV Support

    (@wpmudevsupport15)

    Hi @devchandra,

    I hope you are doing well today!

    Considering the error is actually related with a call to undefined function PHPMailer\PHPMailer\mail() here are the possible reasons and solutions for the issue.

    1. PHPMailer Version and WordPress Core: Ensure that the PHPMailer library included with WordPress is not outdated or corrupted. It is beneficial to check that you’re using a version of WordPress that includes a recent and unmodified version of PHPMailer. If there are updates available for WordPress, consider applying them, as they might include an updated or fixed version of PHPMailer.
    2. PHP Configuration: The issue might stem from the server’s PHP configuration. Specifically, if PHPMailer attempts to fallback to using the native mail() function (under certain configurations or error conditions), and if your server’s PHP configuration has restrictions (e.g., disable_functions directive in php.ini includes mail), this could lead to the observed error. Verify your PHP configuration to ensure that the mail() function is available and not disabled.
    3. File Integrity: Double-check the integrity of the PHPMailer files within your WordPress installation. It’s rare but possible that these files have been corrupted or altered in a way that introduces the problem. Replacing the /wp-includes/PHPMailer folder with a fresh copy from a clean WordPress download (of the same version) can help rule out this possibility.
    4. Server Environment: Some server environments have unique configurations or restrictions that might inadvertently affect how PHP scripts, including PHPMailer, operate. Consult your hosting provider’s documentation or support to see if there are known issues or settings that could interfere with PHPMailer’s operation.

    I hope this helps you to identify the issue.

    Kind regards,
    Zafer

    Thread Starter devchandra

    (@devchandra)

    Hey Zafer,
    Thanks for the quick response.

    I have tried the following steps & the outcome is still the same:
    1. I have installed a fresh copy of wordpress.
    2. I got to know from my hosting provider that the “phpmail() function is disabled on our all Indian shared web hosting servers due to mail Spamming”, so I set it up using WP MAIL SMTP plugin using my hosting provider’s custom information.
    3. I ruled out the third point and checked all the files in Cpanel.

    After doing all of this, I am still getting an error on my forms. Kindly guide me through this.

    I highly appreciate all the help & support.

    Best Regards,
    Dev.

    Plugin Support Nebu John – WPMU DEV Support

    (@wpmudevsupport14)

    Hi @devchandra,

    Sorry to know that you are still experiencing this issue.

    As per the plugin description, the mentioned plugin (WP Mail SMTP) reconfigures the wp_mail() function to use proper SMTP host credentials or an SMTP mail provider.

    The wp_mail() function utilizes the PHPMailer library to send emails. This means, that even with the mentioned plugin, the PHPMailer library is required to generate emails from WordPress.

    Can you please disable the email notification configured for the form and check if the form submission still fails?

    The issue is caused because the phpmail() function is disabled at the hosting end. Please bring this to the notice of the hosting support as this needs to be fixed at the hosting end.

    Kind Regards,
    Nebu John

    Thread Starter devchandra

    (@devchandra)

    Hey Nebu,
    Disabling email notification option has worked out for me for now. I had a word with my hosting provider and they have refused to enable it until I pay more. You’ve been very kind and helpful, thanks a lot & I’m marking this as solved. Good day to you.

    Best Regards,
    Dev.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Error while submitting forms’ is closed to new replies.