PHPMailer Server, CC and Linux
how to add CC mailing address to PHPMailer running on Linux server?
The AddCC method only works on Windows: http://phpmailer.worxware.com/index.php?pg=methods
I tried with this method but mail never arrives ... I also tried with $ mail-> addCustomHeader ('CC: mymail@mail.com ) with no success.
Thanks.
a source to share
I had problems with addCC with PHPMailer when there was already a receiver. To fix this, the safe mode of the mail function in PHPMailer should be removed due to the public server not allowing it. If you enable errors, you will discover where this problem comes from.
The first answer is here for reference. PHPmailer multiple recipients error
a source to share
I have added a few lines of code to my application. And I call it hard stuff. You can add cc to your code like below:
if ($ ccList! = ") {$ ccRecipients = explode (", ", $ ccList); foreach ($ ccRecipients as $ ccRecipient) {$ Mailer-> AddCC ($ ccRecipient); // $ mailer-> AddAddress ($ ccRecipient);} $ mailer-> AddCustomHeader ("Cc: $ ccList");}
You can change the code according to your needs.
I hope this works for you :)
Thanks.
a source to share