[wp-trac] [WordPress Trac] #29513: Move heavy lifting of wp_mail() to child class of PHPMailer
WordPress Trac
noreply at wordpress.org
Wed Aug 6 16:11:23 UTC 2025
#29513: Move heavy lifting of wp_mail() to child class of PHPMailer
-----------------------------------+-----------------------------
Reporter: stephenharris | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Mail | Version: 4.0
Severity: normal | Resolution:
Keywords: 2nd-opinion has-patch | Focuses:
-----------------------------------+-----------------------------
Changes (by SirLouen):
* keywords: 2nd-opinion has-patch needs-refresh => 2nd-opinion has-patch
Comment:
I think that a subclass will be a bad idea for the future, this will
generate a major dependency with that library, and I see no plans to
internally maintain it anytime soon.
Although, `wp_mail` is currently a pluggable, so technically it would
never matter much, but still keeping such will provoke a painful
deprecation cycle. We will be sticking to the lifecycle of PHPMailer,
which is relatively different in other libraries.
Instead, I would suggest creating an `Interface` such as
`WP_Mailer_Interface`, which could be easily displaced if needed. But
still provide an object that can be easily manipulated before sending as
this report reviews.
Before further working on this patch, more should be discussed around this
topic, and we might explore all options including the one proposed in
#49661
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29513#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list