I have read the similar posts about this problem but can't quite get my head around what I am doing wrong here. The 'To' email is received ok.
However, I can not get the 'CC' email to send when using the following script. Any help would be much appreciated.
// Require Pear Mail Packages
require_once ("Mail.php");
require_once ("Mail/mime.php");
require_once ("Mail/mail.php");
$crlf = "
";
$from = "Company <admin@example.com>";
$to = $purchasersName . "<" . $purchasersEmail . ">";
$cc = "Company <admin@example.com>";
$subject = "Company Order Confirmation";
$host = "localhost";
$port = "25";
$username = "the username";
$password = "the password";
$hdrs = array ('From' => $from,
'To' => $to,
'Cc' => $cc,
'Subject' => $subject);
$mime = new Mail_mime(array('eol' => $crlf));
$mime->setHTMLBody($mailBody);
$body = $mime->get();
$hdrs = $mime->headers($hdrs);
$smtp =& Mail::factory('smtp',
array ('host' => $host,
'port' => $port,
'auth' => true,
'username' => $username,
'password' => $password));
$mail = $smtp->send($to, $hdrs, $body);