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;