diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 3a6f3a7ceff..ce86b84a846 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -434,7 +434,10 @@ if (empty($reshook)) { $from = $_POST ['fromname'] . ' <' . $_POST ['frommail'] . '>'; $replyto = $_POST ['replytoname'] . ' <' . $_POST ['replytomail'] . '>'; $message = $_POST ['message']; - $sendtocc = $_POST ['sendtocc']; + + $receivercc = GETPOST('receivercc'); + $sendtocc = ($receivercc!=='') ? $receivercc : $_POST ['sendtocc']; + $deliveryreceipt = $_POST ['deliveryreceipt']; if (dol_strlen($_POST ['subject'])) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 4a2b13b0069..b9805822149 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1571,7 +1571,8 @@ if (empty($reshook)) { $from = $_POST['fromname'] . ' <' . $_POST['frommail'] . '>'; $replyto = $_POST['replytoname'] . ' <' . $_POST['replytomail'] . '>'; $message = $_POST['message']; - $sendtocc = $_POST['sendtocc']; + $receivercc = GETPOST('receivercc'); + $sendtocc = ($receivercc!=='') ? $receivercc : $_POST ['sendtocc']; $deliveryreceipt = $_POST['deliveryreceipt']; if ($action == 'send') {