Reply To: CC recipients

Home Forums Quform PHP CC recipients Reply To: CC recipients

#29751

Erik
Participant

Hi,

It work’s for the 3 emails address and only for the first cc recipients address but not for the 2 others…
Here’s the code i add :

$destinataire = array(‘person1@gmail.com’,’person2@gmail.com’,’person3@gmail.com’);
$destinataire_cc = array(‘person4@gmail.com’,’person5@gmail.com’,’person6@gmail.com’);

define(‘_from_name’, $destinataire);
define(‘_from_cc’, $destinataire_cc);

// Set the recipients
foreach ((array) $config[‘recipients’] as $recipient) {
$mailer->addAddress($recipient);
}

// Set the recipients_cc
foreach ((array) $config[‘recipients_cc’] as $recipient_cc) {
$mailer->addCC($recipient_cc);
}

// Set the message body HTML
ob_start();
include QUFORM_ROOT . $config[’emailBody’];
$mailer->msgHTML(ob_get_clean());

$mailer->AltBody = ‘To view this email please use HTML compatible email software.’;

// Send the notification message
$mailer->send();

Be inspired. © 2019 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy