Use email address_type and default to add_address with an option to use add_bcc.

This commit is contained in:
FusionPBX 2021-10-20 17:07:49 -06:00 committed by GitHub
parent e333b28268
commit 480e34a301
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -273,7 +273,15 @@
foreach ($to_array as $to_row) {
if (strlen($to_row) > 0) {
echo "Add Address: $to_row\n";
$mail->AddBCC(trim($to_row));
if ($_SESSION['email']['address_type']['text'] == 'add_address') {
$mail->AddAddress(trim($to_row));
}
elseif ($_SESSION['email']['address_type']['text'] == 'add_bcc') {
$mail->AddBCC(trim($to_row));
}
else {
$mail->AddAddress(trim($to_row));
}
}
}
}