diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php
index abad66c8a73..b7e9c53a845 100644
--- a/htdocs/core/class/html.formmail.class.php
+++ b/htdocs/core/class/html.formmail.class.php
@@ -676,10 +676,12 @@ class FormMail extends Form
}
else
{
+ // The free input of email
if (!empty($this->withtofree))
{
- $out .= 'withto) : "").'" />';
+ $out .= 'withto) : "")).'" />';
}
+ // The select combo
if (!empty($this->withto) && is_array($this->withto))
{
if (!empty($this->withtofree)) $out .= " ".$langs->trans("and")."/".$langs->trans("or")." ";
diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php
index 1a9a046bf81..169b7753b92 100644
--- a/htdocs/core/tpl/card_presend.tpl.php
+++ b/htdocs/core/tpl/card_presend.tpl.php
@@ -188,7 +188,8 @@ if ($action == 'presend')
}
}
- $formmail->withto = GETPOST('sendto') ? GETPOST('sendto') : $liste;
+ $formmail->withto = $liste;
+ $formmail->withtofree = (GETPOSTISSET('sendto') ? (GETPOST('sendto') ? GETPOST('sendto') : '1') : '');
$formmail->withtocc = $liste;
$formmail->withtoccc = $conf->global->MAIN_EMAIL_USECCC;
$formmail->withtopic = $topicmail;