title: PHPMailer and CC Addresses on Mac OS X
body: <p>I'm using PHPMailer to send emails from the server and it's been working well. We've recently moved the website from Windows Server 2012 to Mac OS X 10.10.</p>
  
  <p>I'm having trouble getting the CC recipients to work now that it's running on Mac OS X.</p>
  
  <p>I add the CC recipients from an array:</p>
  
  <pre><code>foreach($ccRecipients as $ccRecipient)
  {
      $mail-&gt;AddCC($ccRecipient);
  }
  </code></pre>
  
  <p>The email is being sent but no CC addresses are included - it appears that they are somehow being converted into BCC addresses as they emails are delivered to the CC addresses but they are not listed in the CC address section.. Looking at the PHPMailer docs for the AddCC function it mentions that "Note: this function works with the SMTP mailer on win32, not with the "mail" mailer". I gather this means it won't work on OS X?</p>
  
  <p>If that is true is there any way I can work around this and still include CC email addresses with PHPMailer on OS X? Here's some simplified code that sends an email:</p>
  
  <pre><code> require('inc/phpMailer/class.phpmailer.php');     
   $mail = new PHPMailer();
   $mail-&gt;IsSMTP();
  
   $mail-&gt;AddAddress('bill@acme.com');
   $mail-&gt;AddCC('sally@company.com');
  
   $emailSubject = 'Testing PHP Mailer';
   $emailBody = 'Quick manual test of the PHP Mailer';
  
   $mail-&gt;From = 'sales@widgets.com';
   $mail-&gt;FromName = 'Acme Widgets';
  
   $mail-&gt;IsHTML(true);
   $mail-&gt;Subject = $emailSubject;
   $mail-&gt;Body    = $emailBody;
  
   if(!$mail-&gt;Send()) {
   $sendEmailError  = 'There was an error sending the status email: '. $mail-     &gt;ErrorInfo;
   echo $sendEmailError;
   } else {
   $sendEmailError = '';  
   }  
  </code></pre>