wp_mail Declared by Another Plugin - Post SMTP Fix

Start Using Post SMTP for Free

Email

The form has been submitted successfully!

Post SMTP Blog

Tutorials and tips to help you grow your business with WordPress

wp_mail has been declared by another plugin or theme

By Editorial Team

February 7, 2019

Hi,

Many support tickets to the Post SMTP plugin opened because of the error in the title.

Quick intro:

WordPress allows me as a developer to overwrite the internal mailing flow managed by a function called: wp_mail.
this function and a lot more like her (that can be overwritten) are inside a file called: pluggable.php.

The problem:

The file is included by WordPress in a specific event, and then you call each function as you want.
Many less knowledgable plugin developers try to call to a function in the file on a wrong time and getting an error message.
what do they do? instead of investigating and fix them self they doing a “hack” and including the file in each time they getting the error – BAD!!!

Because of the above when I try to overwrite the function, the file already included from one to many times causing a big conflict.

How to solve?

Disable one plugin each time until the message disappears, now you know the problematic plugin, and can decide what to do next: contact the plugin developer, find another one, etc …

👋 Having issues sending email
in WordPress? Lets Chat 👇
Scroll to Top