Title: Plugin Crashing mail functions &#8211; Cannot declare class
Last modified: September 26, 2020

---

# Plugin Crashing mail functions – Cannot declare class

 *  Resolved [Adam Marshall](https://wordpress.org/support/users/ajtek/)
 * (@ajtek)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/plugin-crashing-mail-functions-cannot-declare-class/)
 * This has been happening for over 6 weeks. I figured an update would have fixed
   it by now, but it has not.
 * 2020-09-26T12:55:44+00:00 CRITICAL Cannot declare class PHPMailer\PHPMailer\SMTP,
   because the name is already in use in /public_html/wp-includes/PHPMailer/SMTP.
   php on line 30
 * 2020-09-26T12:58:57+00:00 CRITICAL Cannot declare class PHPMailer\PHPMailer\SMTP,
   because the name is already in use in /public_html/wp-includes/PHPMailer/SMTP.
   php on line 30
 * It started when I upgraded to WP 5.5. I’ve had to keep it disabled since then,
   enabling it every once in a while to test. I’ve got the latest versions of all
   plugins on the site. I’ve got it configured with SendInBlue with a v3 api key.

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

 *  Thread Starter [Adam Marshall](https://wordpress.org/support/users/ajtek/)
 * (@ajtek)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/plugin-crashing-mail-functions-cannot-declare-class/#post-13460750)
 * Debug Log when I enable the WP Mail SMTP plug-in and send a test email from it.
 * Deprecated: class-phpmailer.php is deprecated since version 5.5.0! Use wp-includes/
   PHPMailer/PHPMailer.php instead. The PHPMailer class has been moved to wp-includes/
   PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace. in /home/
   userfolder/public_html/wp-includes/functions.php on line 4963
 * Deprecated: class-smtp.php is deprecated since version 5.5.0! Use wp-includes/
   PHPMailer/SMTP.php instead. The SMTP class has been moved to the wp-includes/
   PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace. in /home/
   userfolder/public_html/wp-includes/functions.php on line 4963
 * Fatal error: Cannot declare class PHPMailer\PHPMailer\SMTP, because the name 
   is already in use in /home/userfolder/public_html/wp-includes/PHPMailer/SMTP.
   php on line 30
    There has been a critical error on your website. Please check
   your site admin email inbox for instructions.
 * Learn more about debugging in WordPress.
 *  [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * (@sanzeeb3)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/plugin-crashing-mail-functions-cannot-declare-class/#post-13462484)
 * Hi [@ajtek](https://wordpress.org/support/users/ajtek/),
 * The error message appears if your plugins or theme is not compatible with WordPress
   5.5. Please share the full error log after sending a test email and share your
   list of activated plugins or follow this [troubleshooting ](https://www.wpbeginner.com/beginners-guide/beginners-guide-to-troubleshooting-wordpress-errors-step-by-step/)
   documentation to find out the incompatible plugin.
 * Thanks.
 *  [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * (@sanzeeb3)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/plugin-crashing-mail-functions-cannot-declare-class/#post-13497078)
 * Hi [@ajtek](https://wordpress.org/support/users/ajtek/) – We haven’t heard from
   you in about a week, so I’m going to go ahead and mark this ticket resolved. 
   If you still have questions, though, please feel welcome to continue the conversation.
 *  Thread Starter [Adam Marshall](https://wordpress.org/support/users/ajtek/)
 * (@ajtek)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/plugin-crashing-mail-functions-cannot-declare-class/#post-13501381)
 * Sorry, been really busy.
 * The full error log is what I had already posted. If there’s a different log, 
   please let me know where it is, or how to generate it.
 * As mentioned, that’s from the debug log.
 * Found another log file:
 * [26-Sep-2020 12:55:43 UTC] PHP Fatal error: Cannot declare class PHPMailer\PHPMailer\
   SMTP, because the name is already in use in /home/userfolder/public_html/wp-includes/
   PHPMailer/SMTP.php on line 30
 * Again, they all reference the same file.
 *  Thread Starter [Adam Marshall](https://wordpress.org/support/users/ajtek/)
 * (@ajtek)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/plugin-crashing-mail-functions-cannot-declare-class/#post-13501382)
 * Active Plugins list:
    Advanced noCaptcha & invisible Captcha PRO AutomateWoo 
   Autoptimize Classic Editor Code Snippets Contact Form 7 Envato Market Envision
   Core Plugin EWWW Image Optimizer Newsletter, SMTP, Email marketing and Subscribe
   forms by Sendinblue Official Facebook Pixel Redirection Slider Revolution Safe
   SVG SupportCandy WooCommerce Stripe Gateway WooCommerce Google Analytics Integration
   WooCommerce Multi-currency WooCommerce PDF Invoices & Packing Slips WooCommerce
   Sendinblue Newsletter Subscription WooCommerce Subscriptions WooCommerce Wordfence
   Assistant Wordfence Security Yoast SEO WP Mail Logging SupportCandy – Automatic
   Close Ticket SupportCandy – Canned Reply SupportCandy – Email Piping SupportCandy–
   Reports SupportCandy – Usergroup SupportCandy Woocommerce Add-On
 *  Thread Starter [Adam Marshall](https://wordpress.org/support/users/ajtek/)
 * (@ajtek)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/plugin-crashing-mail-functions-cannot-declare-class/#post-13501393)
 * Enabled debugging mode again, activated your plugin, then went to Settings > 
   Send Test email
 * Got this erorr:
 * **Deprecated:** class-phpmailer.php is **deprecated **since version 5.5.0! Use
   wp-includes/PHPMailer/PHPMailer.php instead. The PHPMailer class has been moved
   to wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace.
   in **/home/userfolder/public_html/wp-includes/functions.php** on line **4963**
 * **Deprecated:** class-smtp.php is **deprecated **since version 5.5.0! Use wp-
   includes/PHPMailer/SMTP.php instead. The SMTP class has been moved to the wp-
   includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace.
   in **/home/userfolder/public_html/wp-includes/functions.php** on line **4963**
 * **Fatal error:** Cannot declare class PHPMailer\PHPMailer\SMTP, because the name
   is already in use in **/home/userfolder/public_html/wp-includes/PHPMailer/SMTP.
   php** on line **30**
    There has been a critical error on your website. Please
   check your site admin email inbox for instructions.
 * This doesn’t really give much detail as to what is calling it, but rather that
   it is being called by something which looks like the main WordPress functions
   file.
 * I’m using Envision Theme.
 *  [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * (@sanzeeb3)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/plugin-crashing-mail-functions-cannot-declare-class/#post-13502454)
 * Hi [@ajtek](https://wordpress.org/support/users/ajtek/),
 * Thanks for the details. The potential conflict is with the “WooCommerce Sendinblue
   Newsletter Subscription” plugin and [this option ](https://a.supportally.com/9VbYSH)
   within that plugin. Please disable this option or temporarily deactivate this
   plugin. “Newsletter, SMTP, Email marketing and Subscribe forms by Sendinblue”
   might also create the conflict.
 * I hope this helps!
 *  Thread Starter [Adam Marshall](https://wordpress.org/support/users/ajtek/)
 * (@ajtek)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/plugin-crashing-mail-functions-cannot-declare-class/#post-13516085)
 * Disabling both:
    WooCommerce Sendinblue Newsletter Subscription Newsletter, SMTP,
   Email marketing and Subscribe forms by Sendinblue
 * Allowed me to use the plugin successfully. Disabling only 1 still exhibited the
   same symptom, however leaving “WooCommerce Sendinblue Newsletter Subscription”
   active, while keeping the other deactivated, DID send the testing email before
   throwing the error.
 * I’ve written to SendInBlue’s support team on the matter.
 *  [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * (@sanzeeb3)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/plugin-crashing-mail-functions-cannot-declare-class/#post-13521751)
 * Hi [@ajtek](https://wordpress.org/support/users/ajtek/) – Thanks for your testing.
   Please note that you can only disable [this option](https://a.supportally.com/9VbYSH)
   within that plugin.
 * Have a good one!

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

The topic ‘Plugin Crashing mail functions – Cannot declare class’ is closed to new
replies.

 * ![](https://ps.w.org/wp-mail-smtp/assets/icon-256x256.png?rev=1755440)
 * [WP Mail SMTP by WPForms - The Most Popular SMTP and Email Log Plugin](https://wordpress.org/plugins/wp-mail-smtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-mail-smtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-mail-smtp/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-mail-smtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-mail-smtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-mail-smtp/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/plugin-crashing-mail-functions-cannot-declare-class/#post-13521751)
 * Status: resolved