Title: wp_mail declared by another plugin or theme error
Last modified: February 7, 2023

---

# wp_mail declared by another plugin or theme error

 *  Resolved [ashleighm](https://wordpress.org/support/users/ashleighm/)
 * (@ashleighm)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/wp_mail-declared-by-another-plugin-or-theme-error-2/)
 * FATAL Postman: Postman: wp_mail has been declared by another plugin or theme,
   so you won’t be able to use Postman until the conflict is resolved.
 * Reopening this old thread: [https://wordpress.org/support/topic/wp_mail-declared-by-another-plugin-or-theme-error/](https://wordpress.org/support/topic/wp_mail-declared-by-another-plugin-or-theme-error/)
 * I’m still getting this error logged in my error log on every page load/bot craw/
   cron job.
 * Sending doesn’t actually seem to be affected because all of my site emails send
   are logged by the plugin.
 * In testing, the error message goes away when I deactivate WP Optimize. The error
   message persists when switched to 2022 theme and only Post SMTP and WP Optimize
   are active, and all other plugins are deactivated.
   The error does not include
   more information or a url to where wp_mail is being declared.

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

 *  [M Haseeb](https://wordpress.org/support/users/haseeb0001/)
 * (@haseeb0001)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/wp_mail-declared-by-another-plugin-or-theme-error-2/#post-16451670)
 * [@ashleighm](https://wordpress.org/support/users/ashleighm/) Hi,
 * I hope you are doing well.
 *  When you disable the wp optimize plugin, this issue is gone ?
 * Share Post SMTP diagnostic test report.
 * Thanks
 *  Thread Starter [ashleighm](https://wordpress.org/support/users/ashleighm/)
 * (@ashleighm)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/wp_mail-declared-by-another-plugin-or-theme-error-2/#post-16453862)
 * Yes, it stops giving the log message when I deactivate wp optimize.
 *     ```wp-block-code
       Mailer: postsmtp
       HostName: charmcat.net
       cURL Version: 7.58.0
       OpenSSL Version: OpenSSL/1.1.1
       OS: Linux pod-120104:apache2_74:v0.0.1 5.4.0-1069-gcp #73~18.04.1-Ubuntu SMP Wed Mar 30 06:23:51 UTC 2022 x86_64
       PHP: Linux 7.4.33 C
       PHP Dependencies: iconv=Yes, spl_autoload=Yes, openssl=Yes, sockets=Yes, allow_url_fopen=Yes, mcrypt=No, zlib_encode=Yes
       WordPress: 6.1.1 en_US UTF-8
       WordPress Theme: CharmCat Theme v3
       WordPress Plugins: Advanced Coupons for WooCommerce Free, Advanced Coupons for WooCommerce Premium, Akismet Anti-Spam, Astra Pro, Beautiful and responsive cookie consent, CC Custom Functions, CC Owl Carousels, Toolset Forms, Enhanced Media Library PRO, Facebook for WooCommerce, Klaviyo, PixelYourSite Pinterest, PixelYourSite, Post SMTP, Products Linked by Variations for WooCommerce, PW WooCommerce Gift Cards, reCaptcha for WooCommerce, Regenerate Thumbnails, Relevanssi, Simple History, Social Warfare, Tasty Pins, Toolset Blocks, Toolset Access, Toolset Types, UpdraftPlus - Backup/Restore, Product Feed PRO for WooCommerce, WooCommerce Conditional Shipping and Payments, WooCommerce Stripe Gateway, WooCommerce Google Analytics Integration, WooCommerce PayPal Payments, WooCommerce Product Add-ons, WooCommerce Shipment Tracking, WooCommerce Ship to Multiple Addresses, WooCommerce - StampscomEndicia Integration, Toolset WooCommerce Blocks, WooCommerce Wholesale Prices Premium, WooCommerce Wholesale Prices, WooCommerce Zapier, WooCommerce, Wordfence Security, Yoast SEO, WP Crontrol, Yoast SEO: WooCommerce
       WordPress wp_mail Owner: /nas/content/live/charmcat/wp-content/plugins/post-smtp/Postman/PostmanWpMailBinder.php
       WordPress wp_mail Filter(s): wp_staticize_emoji_for_email, PostsmtpMailer->get_mail_args
       WordPress wp_mail_from Filter(s): wordfence::fixWPMailFromAddress
       Postman: 2.3.2
       Postman Sender Domain (Envelope|Message): charmcat.net | charmcat.net
       Postman Prevent Message Sender Override (Email|Name): Yes | Yes
       Postman Active Transport: Gmail API (https:oauth2://www.googleapis.com:443)
       Postman Active Transport Status (Ready|Connected): Yes | Yes
       Postman Deliveries (Success|Fail): 3629 | 7
       ```
   
 *  [M Haseeb](https://wordpress.org/support/users/haseeb0001/)
 * (@haseeb0001)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/wp_mail-declared-by-another-plugin-or-theme-error-2/#post-16459221)
 * [@ashleighm](https://wordpress.org/support/users/ashleighm/) ok, so it’s mean
   WP Optimize is conflicting with Post SMTP, let me test it with our plugin, and
   if there are any issues, I will fix them and release the updated version soon.
 * Thanks

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

The topic ‘wp_mail declared by another plugin or theme error’ is closed to new replies.

 * ![](https://ps.w.org/post-smtp/assets/icon-128x128.gif?rev=3209655)
 * [Post SMTP – Complete Email Deliverability and SMTP Solution with Email Logs, Alerts, Backup SMTP & Mobile App](https://wordpress.org/plugins/post-smtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-smtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-smtp/)
 * [Active Topics](https://wordpress.org/support/plugin/post-smtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-smtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-smtp/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [M Haseeb](https://wordpress.org/support/users/haseeb0001/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/wp_mail-declared-by-another-plugin-or-theme-error-2/#post-16459221)
 * Status: resolved