WordPress.org

Make WordPress Core

Ticket #10420: 10420-pluggable.php.diff

File 10420-pluggable.php.diff, 562 bytes (added by patmcnally, 9 years ago)

Splits first parameter to wp_mail on commas and calls AddAddress for each

  • trunk/wp-includes/pluggable.php

     
    374374        $phpmailer->FromName = apply_filters( 'wp_mail_from_name', $from_name );
    375375
    376376        // Set destination address
    377         $phpmailer->AddAddress( $to );
     377        foreach ( split(",",$to) as $recipient ){
     378                $phpmailer->AddAddress( trim($recipient) );
     379        }
    378380
    379381        // Set mail's subject and body
    380382        $phpmailer->Subject = $subject;