Changeset 8098

Show
Ignore:
Timestamp:
06/16/08 20:02:10 (5 months ago)
Author:
ryan
Message:

Handle cc and bcc. Props MattyRob?. fixes #6899

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/pluggable.php

    r8069 r8098  
    316316                        $content_type = trim( $content ); 
    317317                    } 
     318                } elseif ( 'cc' == strtolower($name) ) { 
     319                    $cc = explode(",", $content); 
     320                } elseif ( 'bcc' == strtolower($name) ) { 
     321                    $bcc = explode(",", $content); 
    318322                } else { 
    319323                    // Add it to our grand headers array 
     
    360364    $phpmailer->Subject = $subject; 
    361365    $phpmailer->Body = $message; 
     366 
     367    // Add any CC and BCC recipients 
     368    if ( !empty($cc) ) { 
     369        foreach ($cc as $recipient) { 
     370            $phpmailer->AddCc( trim($recipient) ); 
     371        } 
     372    } 
     373    if ( !empty($bcc) ) { 
     374        foreach ($bcc as $recipient) { 
     375            $phpmailer->AddBcc( trim($recipient) ); 
     376        } 
     377    } 
    362378 
    363379    // Set to use PHP's mail()