Fix: Pb sur le destinataire des envois de factures.
This commit is contained in:
parent
93dc96cdbe
commit
8fb86eba2c
@ -340,6 +340,8 @@ if ($_POST["action"] == 'confirm_canceled' && $_POST["confirm"] == yes)
|
||||
*/
|
||||
if ($_POST["action"] == 'send' || $_POST["action"] == 'relance')
|
||||
{
|
||||
$langs->load("mails");
|
||||
|
||||
$fac = new Facture($db,"",$_POST["facid"]);
|
||||
if ( $fac->fetch($_POST["facid"]) )
|
||||
{
|
||||
@ -392,7 +394,7 @@ if ($_POST["action"] == 'send' || $_POST["action"] == 'relance')
|
||||
|
||||
if ( $mailfile->sendfile() )
|
||||
{
|
||||
$msg='<div class="ok">Mails envoyé avec succès à '.htmlentities($sendto).' (de la part de '.htmlentities($from).')</div>';
|
||||
$msg='<div class="ok">'.$langs->trans("MailSuccessfulySent",$sendto,$from).'.</div>';
|
||||
|
||||
$sendto = htmlentities($sendto);
|
||||
|
||||
@ -410,12 +412,12 @@ if ($_POST["action"] == 'send' || $_POST["action"] == 'relance')
|
||||
}
|
||||
else
|
||||
{
|
||||
$msg='<div class="error">'.$langs->trans("ErrorFailedToSendMail",htmlentities($from),htmlentities($sendto)).'</div>';
|
||||
$msg='<div class="error">'.$langs->trans("ErrorFailedToSendMail",$from,$sendto).' !</div>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$msg='<div class="error">'.htmlentities($langs->trans("Le mail du destinataire est vide")).'</div>';
|
||||
$msg='<div class="error">'.$langs->trans("ErrorMailRecipientIsEmpty").' !</div>';
|
||||
dolibarr_syslog("Le mail du destinataire est vide");
|
||||
}
|
||||
|
||||
|
||||
@ -24,4 +24,6 @@ MailingStatusDraft=Draft
|
||||
MailingStatusValidated=Validated
|
||||
MailingStatusApproved=Approved
|
||||
MailingStatusSent=Sent
|
||||
MailSuccessfulySent=Mail successfuly sent
|
||||
ErrorMailRecipientIsEmpty=Mail recipient is empty
|
||||
|
||||
|
||||
@ -24,3 +24,5 @@ MailingStatusDraft=Brouillon
|
||||
MailingStatusValidated=Validé
|
||||
MailingStatusApproved=Apprové
|
||||
MailingStatusSent=Envoyé
|
||||
MailSuccessfulySent=Mail envoyé avec succès
|
||||
ErrorMailRecipientIsEmpty=Le mail du destinataire est vide
|
||||
|
||||
@ -36,6 +36,7 @@ to chunk_split
|
||||
class CMailFile
|
||||
{
|
||||
var $subject;
|
||||
var $addr_from;
|
||||
var $addr_to;
|
||||
var $addr_cc;
|
||||
var $addr_bcc;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user