From a859812643b96d1b601f31c1f97ccfafc9b33f95 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 18 May 2009 01:46:30 +0000 Subject: [PATCH] Fix: Sender name is not lost if we add an attached file. --- htdocs/admin/mails.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index e362d941718..0e36a668e80 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -419,9 +419,9 @@ else // Boutons actions print '
'; - + print ''.$langs->trans("Modify").''; - + if ($conf->global->MAIN_MAIL_SENDMODE != 'mail' || ! $linuxlike) { if (function_exists('fsockopen') && $port && $server) @@ -435,12 +435,12 @@ else } print ''.$langs->trans("DoTestSend").''; - + if ($conf->fckeditor->enabled) { print ''.$langs->trans("DoTestSendHTML").''; } - + print '
'; @@ -518,8 +518,8 @@ else // Cree l'objet formulaire mail include_once(DOL_DOCUMENT_ROOT."/html.formmail.class.php"); $formmail = new FormMail($db); - $formmail->fromname = $conf->global->MAIN_MAIL_EMAIL_FROM; - $formmail->frommail = $conf->global->MAIN_MAIL_EMAIL_FROM; + $formmail->fromname = (isset($_POST['fromname'])?$_POST['fromname']:$conf->global->MAIN_MAIL_EMAIL_FROM); + $formmail->frommail = (isset($_POST['frommail'])?$_POST['frommail']:$conf->global->MAIN_MAIL_EMAIL_FROM); $formmail->withfromreadonly=0; $formmail->withsubstit=0; $formmail->withfrom=1;