Fix: Sender name is not lost if we add an attached file.

This commit is contained in:
Laurent Destailleur 2009-05-18 01:46:30 +00:00
parent 0f3c26dfe1
commit a859812643

View File

@ -518,8 +518,8 @@ else
// Cree l'objet formulaire mail // Cree l'objet formulaire mail
include_once(DOL_DOCUMENT_ROOT."/html.formmail.class.php"); include_once(DOL_DOCUMENT_ROOT."/html.formmail.class.php");
$formmail = new FormMail($db); $formmail = new FormMail($db);
$formmail->fromname = $conf->global->MAIN_MAIL_EMAIL_FROM; $formmail->fromname = (isset($_POST['fromname'])?$_POST['fromname']:$conf->global->MAIN_MAIL_EMAIL_FROM);
$formmail->frommail = $conf->global->MAIN_MAIL_EMAIL_FROM; $formmail->frommail = (isset($_POST['frommail'])?$_POST['frommail']:$conf->global->MAIN_MAIL_EMAIL_FROM);
$formmail->withfromreadonly=0; $formmail->withfromreadonly=0;
$formmail->withsubstit=0; $formmail->withsubstit=0;
$formmail->withfrom=1; $formmail->withfrom=1;