diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php
index 1f505734d4d..90f14fa27ff 100644
--- a/htdocs/core/class/html.formmail.class.php
+++ b/htdocs/core/class/html.formmail.class.php
@@ -48,6 +48,7 @@ class FormMail
var $withsubstit; // Show substitution array
var $withfrom;
var $withto;
+ var $withtofree;
var $withtocc;
var $withtopic;
var $withfile; // 0=No attaches files, 1=Show attached files, 2=Can add new attached files
@@ -79,6 +80,7 @@ class FormMail
$this->withfrom=1;
$this->withto=1;
+ $this->withtofree=1;
$this->withtocc=1;
$this->withtoccc=0;
$this->witherrorsto=0;
@@ -332,7 +334,10 @@ class FormMail
}
else
{
- $out.= 'withto) :"").'" />';
+ if ($this->withtofree)
+ {
+ $out.= 'withto) :"").'" />';
+ }
if ($this->withtosocid > 0)
{
$liste=array();
@@ -343,7 +348,7 @@ class FormMail
{
$liste[$key]=$value;
}
- $out.= " ".$langs->trans("or")." ";
+ if ($this->withtofree) $out.= " ".$langs->trans("or")." ";
//var_dump($_REQUEST);exit;
$out.= $form->selectarray("receiver", $liste, isset($_REQUEST["receiver"])?$_REQUEST["receiver"]:0);
}