From 95de6c91ca2fb3b0ee48578c45d21fbc934a769f Mon Sep 17 00:00:00 2001 From: lkehresman Date: Sat, 15 Jul 2000 15:32:41 +0000 Subject: [PATCH] fixed bug that didn't send "from" header correctly. It sent it without quotes around the name like this: Luke Ehresman git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@620 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/smtp.php | 2 +- src/compose.php | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/functions/smtp.php b/functions/smtp.php index 5900fe9f..fae9ea73 100644 --- a/functions/smtp.php +++ b/functions/smtp.php @@ -136,7 +136,7 @@ if ($from == "") $from = "<$from_addr>"; else - $from = encodeHeader($from) . " <$from_addr>"; + $from = "\"" . encodeHeader($from) . "\" <$from_addr>"; /* This creates an RFC 822 date */ $date = date("D, j M Y H:i:s ", mktime()) . timezone(); diff --git a/src/compose.php b/src/compose.php index 4c473d86..85aba181 100644 --- a/src/compose.php +++ b/src/compose.php @@ -43,8 +43,8 @@ global $forward_id, $imapConnection, $msg, $ent_num, $body_ary, $body, $reply_id, $send_to, $send_to_cc, $mailbox, $send_to_bcc; - $send_to = decodeHeader($send_to); - $send_to_cc = decodeHeader($send_to_cc); + $send_to = stripslashes(decodeHeader($send_to)); + $send_to_cc = stripslashes(decodeHeader($send_to_cc)); if ($forward_id) $id = $forward_id; @@ -75,7 +75,7 @@ $body = ""; for ($i=0; $i < count($body_ary); $i++) { if ($i==0 && $forward_id) { - $tmp = _("-------- Original Message ---------\n"); + $tmp = "-------- " . _("Original Message") . " --------"; $tmp .= _("Subject") . ": " . $orig_header->subject . "\n"; $tmp .= " " . _("From") . ": " . $orig_header->from . "\n"; $tmp .= " " . _("To") . ": " . $orig_header->to[0] . "\n"; @@ -96,13 +96,12 @@ return $body; } + $send_to = stripslashes($send_to); + if (!$send_to) { $send_to = sqimap_find_email($send_to); } -// $send_to = ereg_replace("\"", "", $send_to); - $send_to = stripslashes($send_to); - /** This formats a CC string if they hit "reply all" **/ if ($send_to_cc != "") { $send_to_cc = ereg_replace(";", ",", $send_to_cc); @@ -152,7 +151,7 @@ echo "// -->\n\n"; } - echo "\n
\n"; + echo "\n\n"; if ($reply_id) { echo "\n"; } @@ -251,8 +250,8 @@ // echo " \n"; echo " \n"; - echo "   \n"; + echo "   \n"; echo " \n"; echo " \n"; if (isset($attachments) && count($attachments)>0) { -- 2.25.1