diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php
index 16c541b7ff5..4d6f3bb873b 100644
--- a/htdocs/comm/propal.php
+++ b/htdocs/comm/propal.php
@@ -256,19 +256,26 @@ if ($_POST['action'] == 'send')
$replyto = $_POST['replytoname']. ' <' . $_POST['replytomail'].'>';
$message = $_POST['message'];
$sendtocc = $_POST['sendtocc'];
+
if ($_POST['action'] == 'send')
{
- $subject = $_POST['subject'];
- if($subject == '')
- $subject = $langs->trans('Propal').' '.$propal->ref;
- $actiontypeid=3;
- $actionmsg ='Mail envoyé par '.$from.' à '.$sendto.'.
';
- if ($message)
- {
- $actionmsg.='Texte utilisé dans le corps du message:
';
- $actionmsg.=$message;
- }
- $actionmsg2='Envoi Propal par mail';
+ $subject = $_POST['subject'];
+
+ if($subject == '')
+ {
+ $subject = $langs->trans('Propal').' '.$propal->ref;
+ }
+
+ $actiontypeid=3;
+ $actionmsg ='Mail envoyé par '.$from.' à '.$sendto.'.
';
+
+ if ($message)
+ {
+ $actionmsg.='Texte utilisé dans le corps du message:
';
+ $actionmsg.=$message;
+ }
+
+ $actionmsg2='Envoi Propal par mail';
}
$filepath[0] = $file;
diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php
index ae1b65bca5f..dc19a8c5b9d 100644
--- a/htdocs/commande/fiche.php
+++ b/htdocs/commande/fiche.php
@@ -349,17 +349,27 @@ if ($_POST['action'] == 'send')
$from = $_POST['fromname'] . ' <' . $_POST['frommail'] .'>';
$replyto = $_POST['replytoname']. ' <' . $_POST['replytomail'].'>';
$message = $_POST['message'];
+ $sendtocc = $_POST['sendtocc'];
+
if ($_POST['action'] == 'send')
{
- $subject = $langs->trans('Order').' '.$commande->ref;
- $actiontypeid=3;
- $actionmsg ='Mail envoyé par '.$from.' à '.$sendto.'.
';
- if ($message)
- {
- $actionmsg.='Texte utilisé dans le corps du message:
';
- $actionmsg.=$message;
- }
- $actionmsg2='Envoi commande par mail';
+ $subject = $_POST['subject'];
+
+ if($subject == '')
+ {
+ $subject = $langs->trans('Order').' '.$commande->ref;
+ }
+
+ $actiontypeid=3;
+ $actionmsg ='Mail envoyé par '.$from.' à '.$sendto.'.
';
+
+ if ($message)
+ {
+ $actionmsg.='Texte utilisé dans le corps du message:
';
+ $actionmsg.=$message;
+ }
+
+ $actionmsg2='Envoi commande par mail';
}
$filepath[0] = $file;
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 290ea389d08..eaaffcc9582 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -508,18 +508,28 @@ if ($_POST['action'] == 'send' || $_POST['action'] == 'relance')
$from = $_POST['fromname'] . ' <' . $_POST['frommail'] .'>';
$replyto = $_POST['replytoname']. ' <' . $_POST['replytomail'].'>';
$message = $_POST['message'];
+ $sendtocc = $_POST['sendtocc'];
+
if ($_POST['action'] == 'send')
{
if(strlen($_POST['subject']))
+ {
$subject = $_POST['subject'];
+ }
else
+ {
$subject = $langs->trans('Bill').' '.$fac->ref;
+ }
+
$actiontypeid=9;
$actionmsg ='Mail envoyé par '.$from.' à '.$sendto.'.
';
- if ($message) {
+
+ if ($message)
+ {
$actionmsg.='Texte utilisé dans le corps du message:
';
$actionmsg.=$message;
}
+
$actionmsg2='Envoi facture par mail';
}
if ($_POST['action'] == 'relance')