[wp-trac] [WordPress Trac] #10420: wp_mail fails to send to multiple recipients
WordPress Trac
wp-trac at lists.automattic.com
Wed Jul 15 20:25:29 UTC 2009
#10420: wp_mail fails to send to multiple recipients
--------------------------+-------------------------------------------------
Reporter: patmcnally | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: Mail | Version: 2.8.1
Severity: normal | Keywords: wp_mail, smtp, mail
--------------------------+-------------------------------------------------
The function wp_mail as defined in wp-includes/pluggable.php does not
correctly handle multiple recipients when they are passed in as a comma
separated string to the first parameter($to). This is evident when using
any SMTP server that strictly adheres to section 4.1.1.3 of rfc2821 (such
as gmail).
For example when the first parameter to wp_mail is "foo at example.com,
bar at example.com" this string is passed directly to the SMTP server in the
first and only RCPT command. Expected behavior is two separate RCPT
commands, one for each email address.
phpmailer supports the required functionality, however
$phpmailer->AddAddress needs to be called multiple times for each email
address contained in the first parameter ($to). Instead AddAddress is
called only once, borking any attempts to send to multiple recipients when
using gmail's SMTP server.
I would submit a patch, however this is my first time investigating both
php and Wordpress and fear that I could only do more harm than good.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10420>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list