Title: Error while submitting forms
Last modified: April 19, 2024

---

# Error while submitting forms

 *  Resolved [devchandra](https://wordpress.org/support/users/devchandra/)
 * (@devchandra)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/error-while-submitting-forms/)
 * 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](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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-while-submitting-forms%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Support [Jair – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport15/)
 * (@wpmudevsupport15)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/error-while-submitting-forms/#post-17699401)
 * Hi [@devchandra](https://wordpress.org/support/users/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](https://wordpress.org/support/users/devchandra/)
 * (@devchandra)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/error-while-submitting-forms/#post-17711374)
 * 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](https://wordpress.org/support/users/wpmudevsupport14/)
 * (@wpmudevsupport14)
 * [2 years ago](https://wordpress.org/support/topic/error-while-submitting-forms/#post-17717236)
 * Hi [@devchandra](https://wordpress.org/support/users/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](https://wordpress.org/support/users/devchandra/)
 * (@devchandra)
 * [2 years ago](https://wordpress.org/support/topic/error-while-submitting-forms/#post-17725553)
 * 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.

 * ![](https://ps.w.org/forminator/assets/icon-256x256.gif?rev=3443182)
 * [Forminator Forms – Contact Form, Payment Form & Custom Form Builder](https://wordpress.org/plugins/forminator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/forminator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/forminator/)
 * [Active Topics](https://wordpress.org/support/plugin/forminator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/forminator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/forminator/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [devchandra](https://wordpress.org/support/users/devchandra/)
 * Last activity: [2 years ago](https://wordpress.org/support/topic/error-while-submitting-forms/#post-17725553)
 * Status: resolved