[wp-trac] [WordPress Trac] #15539: wp_mail() should allow using PHPmailer's SMTP feature
WordPress Trac
wp-trac at lists.automattic.com
Mon Nov 22 16:51:55 UTC 2010
#15539: wp_mail() should allow using PHPmailer's SMTP feature
--------------------------+-------------------------------------------------
Reporter: mastermind | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Mail | Version: 3.1
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
{{{wp_mail()}}} is able to use an already existing instance of PHPmailer.
Unfortunately, all settings from the existing instance are then reset.
While this makes sense for things like addresses and subject, it is very
bad that {{{$phpmailer->IsMail()}}} is called.
This makes it impossible to create and configure an own instance for usage
with a remote MTA.
Possible solutions:
1. Simply omit the call to {{{$phpmailer->IsMail()}}}, as {{{'mail'}}} is
already the default value.
2. Move the call of {{{$phpmailer->IsMail()}}} into the {{{if}}} statement
at the beginning of the {{{wp_mail()}}} function, so it will only be set
if the instance is not set.
3. Add a parameter to the signature of {{{wp_mail()}}} which allows to set
the desired MTA backend.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15539>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list