From 480e34a301558f6f45f0797ca294c7a222742b61 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 20 Oct 2021 17:07:49 -0600 Subject: [PATCH] Use email address_type and default to add_address with an option to use add_bcc. --- secure/v_mailto.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/secure/v_mailto.php b/secure/v_mailto.php index 4ac5da15bf..ccaa2780c6 100644 --- a/secure/v_mailto.php +++ b/secure/v_mailto.php @@ -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)); + } } } }