Fix: Pb affichage des retours chariots sur le body des mails
This commit is contained in:
parent
290c9d4546
commit
dae88ffd44
@ -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='<div class="error">'.$langs->trans("ResultKo").'</div>';
|
||||
}
|
||||
error_reporting($errorlevel);
|
||||
|
||||
$_GET["action"]='';
|
||||
$_GET["id"]=$mil->id;
|
||||
|
||||
@ -220,15 +220,17 @@ class FormMail
|
||||
print "<tr>";
|
||||
print "<td width=\"180\" valign=\"top\">".$langs->trans("MailText")."</td>";
|
||||
print "<td>";
|
||||
if (! $this->withbodyreadonly) {
|
||||
print '<textarea cols="72" rows="8" name="message">';
|
||||
}
|
||||
print $defaultmessage;
|
||||
if (! $this->withbodyreadonly) {
|
||||
print '</textarea>';
|
||||
} else {
|
||||
if ($this->withbodyreadonly)
|
||||
{
|
||||
print nl2br($defaultmessage);
|
||||
print '<input type="hidden" name="message" value="'.$defaultmessage.'">';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<textarea cols="72" rows="8" name="message">';
|
||||
print $defaultmessage;
|
||||
print '</textarea>';
|
||||
}
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user