Search code examples
phpemailphpmailer

phpmailer sending to CC works fine, but CC not being displayed in mail (like BCC) when in SMTP mode


PHPmailer Version: 2.0.4

when running the following lines

$Mail = new PHPMailer();
$Mail->IsSMTP();
$Mail->AddAddress("[email protected]");
$Mail->AddCC("[email protected]");
... set some body, set host, set sender info, and so on
$Mail->send();

both first and second would get the mail, but the second address does not appear on the mail as a CC, just like it was BCCed instead of CCed.

when commenting out the IsSMTP() => using default 'mail' mode, the CC is being displayed as expected.

tried to google this effect, but seems like i'm the only person on the planet having experienced this issue...


Solution

  • address does not appear on the mail

    Your question is barely answearable due to lack of data like raw headers of sent mails. I'd ask for this in the comment but I think it's pointless in your case because...

    PHPmailer Version: 2.0.4

    I hardly see version 2.0.4 in PHPMailer's changelog, but assuming it has been released somewhere between release of 2.0.0 rc2 and 2.1.0 beta1 it still means you are using code released around Dec 2007

    Upgrade for god's sake!