Make WordPress Core

Ticket #6899: patch.diff

File patch.diff, 984 bytes (added by MattyRob, 19 years ago)
  • pluggable.php

     
    313313                                        } else {
    314314                                                $content_type = trim( $content );
    315315                                        }
     316                                } elseif ( 'cc' == strtolower($name) ) {
     317                                        $cc = explode(",", $content);
     318                                } elseif ( 'bcc' == strtolower($name) ) {
     319                                        $bcc = explode(",", $content);
    316320                                } else {
    317321                                        // Add it to our grand headers array
    318322                                        $headers[trim( $name )] = trim( $content );
    … …  
    358362        $phpmailer->Subject = $subject;
    359363        $phpmailer->Body = $message;
    360364
     365        // Add any CC and BCC recipients
     366        if ( !empty($cc) ) {
     367                foreach ($cc as $recipient) {
     368                        $phpmailer->AddCc( trim($recipient) );
     369                }
     370        }
     371        if ( !empty($bcc) ) {
     372                foreach ($bcc as $recipient) {
     373                        $phpmailer->AddBcc( trim($recipient) );
     374                }
     375        }
     376
    361377        // Set to use PHP's mail()
    362378        $phpmailer->IsMail();
    363379
    … …  
    14171433}
    14181434endif;
    14191435
    1420 ?>
     1436?>
     1437 No newline at end of file