From afbe36d5724909f96050b937741f2ff74b96f45c Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Sun, 29 Jun 2008 16:11:37 +0000 Subject: [PATCH] sendmail.php: - do not escape_string() the mailbody - having \n in mails instead of real newlines is not nice. This fixes https://sourceforge.net/tracker/?func=detail&atid=937964&aid=2005839&group_id=191583 Thanks to Tabmow for the report! - added missing newline between headers and message body git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@396 a1433add-5e2c-0410-b055-b7f2511e0802 --- sendmail.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sendmail.php b/sendmail.php index 80e868b5..8b12c7db 100644 --- a/sendmail.php +++ b/sendmail.php @@ -49,15 +49,20 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") $fHeaders .= "MIME-Version: 1.0\n"; $fHeaders .= "Content-Type: text/plain; charset=utf-8\n"; $fHeaders .= "Content-Transfer-Encoding: 8bit\n"; + $fHeaders .= "\n"; - $fHeaders .= escape_string ($_POST['fBody']); + $tBody = $_POST['fBody']; + if (get_magic_quotes_gpc ()) + { + $tBody = stripslashes($tBody); + } + $fHeaders .= $tBody; if (empty ($fTo) or !check_email ($fTo)) { $error = 1; $tTo = escape_string ($_POST['fTo']); $tSubject = escape_string ($_POST['fSubject']); - $tBody = escape_string ($_POST['fBody']); $tMessage = $PALANG['pSendmail_to_text_error']; }