diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php
index f40c4bf1fe0..facc29c85f0 100644
--- a/htdocs/comm/mailing/fiche.php
+++ b/htdocs/comm/mailing/fiche.php
@@ -73,6 +73,7 @@ if ($_POST["action"] == 'send')
$headers .= "X-Priority: 3\r\n";
$headers .= "X-Mailer: Dolibarr ".DOL_VERSION."\r\n";
+ $errorlevel=error_reporting(0);
$m=mail($mil->sendto, $mil->sujet, $mil->body, $headers);
if($m)
@@ -83,6 +84,7 @@ if ($_POST["action"] == 'send')
{
$message='
'.$langs->trans("ResultKo").'
';
}
+ error_reporting($errorlevel);
$_GET["action"]='';
$_GET["id"]=$mil->id;
diff --git a/htdocs/html.formmail.class.php b/htdocs/html.formmail.class.php
index 9ec7cb7d2ef..41ca0af55b9 100644
--- a/htdocs/html.formmail.class.php
+++ b/htdocs/html.formmail.class.php
@@ -220,15 +220,17 @@ class FormMail
print "";
print "| ".$langs->trans("MailText")." | ";
print "";
- if (! $this->withbodyreadonly) {
- print '';
- } else {
+ if ($this->withbodyreadonly)
+ {
+ print nl2br($defaultmessage);
print '';
}
+ else
+ {
+ print '';
+ }
print " |
\n";
}