From 6b2966794a1821edb332d036bd42808c8fb672c2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 23 Sep 2013 14:35:22 +0200 Subject: [PATCH] Do not show free text for thirdparty email send form --- htdocs/core/class/html.formmail.class.php | 4 ++-- htdocs/societe/soc.php | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 159f85218de..e5dc008fc2e 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -46,8 +46,8 @@ class FormMail var $withsubstit; // Show substitution array var $withfrom; - var $withto; - var $withtofree; + var $withto; // Show recipient emails + var $withtofree; // Show free text for recipient emails var $withtocc; var $withtoccc; var $withtopic; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 31ab62639f1..837cb98d579 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -450,10 +450,13 @@ if (empty($reshook)) $result = $object->set_parent(GETPOST('editparentcompany','int')); } + + // Actions to send emails $id=$socid; $actiontypecode='AC_OTH_AUTO'; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; + /* * Generate document */ @@ -1824,6 +1827,7 @@ else $liste=array(); foreach ($object->thirdparty_and_contact_email_array(1) as $key=>$value) $liste[$key]=$value; $formmail->withto=GETPOST('sendto')?GETPOST('sendto'):$liste; + $formmail->withtofree=0; $formmail->withtocc=$liste; $formmail->withtoccc=$conf->global->MAIN_EMAIL_USECCC; $formmail->withfile=2;