Hi all, and thanks in advance,
I added a new row to my “book order confirm” code, basically I want to send this email template to multiple user, so I added the function “addCc” to my script, here is the code
$mail->setFrom($distributor->getBusinessEmail(), $distributor->getCompanyName());
$mail->addRecipient($distributor->getNotificationEmail(), $distributor->getCompanyName());
$mail->addCc($distributor->getDirectorEmail(), $distributor->getCompanyName());
$mail->setSubject($mail->getSubject($journal->getPrimaryLocale()));
$mail->setBody($mail->getBody($journal->getPrimaryLocale()));
Unfortunately the email setup as $distributor->getDirectorEmail() has not received any email, so I wonder if addCc function has a different porpoise and I should use “addRecipient” instead, does “addRecipient” create a queue of emails or it send to only one recipient?
If “addRecipient” send email to multiple recipients I’ll modify the code in this way:
$mail->setFrom($distributor->getBusinessEmail(), $distributor->getCompanyName());
$mail->addRecipient($distributor->getNotificationEmail(), $distributor->getCompanyName());
$mail->addRecipient($distributor->getDirectorEmail(), $distributor->getCompanyName());
$mail->setSubject($mail->getSubject($journal->getPrimaryLocale()));
$mail->setBody($mail->getBody($journal->getPrimaryLocale()));
Hope this make sense
Thanks