[wp-trac] [WordPress Trac] #10420: wp_mail fails to send to multiple recipients

WordPress Trac wp-trac at lists.automattic.com
Fri Jul 24 20:29:29 UTC 2009


#10420: wp_mail fails to send to multiple recipients
-------------------------+--------------------------------------------------
 Reporter:  patmcnally   |       Owner:                                             
     Type:  enhancement  |      Status:  new                                        
 Priority:  normal       |   Milestone:  2.9                                        
Component:  Mail         |     Version:  2.9                                        
 Severity:  normal       |    Keywords:  has-patch needs-testing wp_mail, smtp, mail
-------------------------+--------------------------------------------------

Comment(by pkthree):

 patmcnally's idea gets my +1

 You could also support both comma separated lists and arrays in the $to
 variable with this:

 {{{
 // Set destination address(es)
 // Accept either a comma-separated list or an array
 $to = explode( ',', implode( ',', (array) $to ) );
 foreach ( $to as $to_recipient ) {
     $phpmailer->AddAddress( trim( $to_recipient ) );
 }
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10420#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list