From 912c949d49dcbd76bca07205fc9f32d8be7c9921 Mon Sep 17 00:00:00 2001 From: fidian Date: Sun, 20 May 2001 14:57:57 +0000 Subject: [PATCH] * Fixed text attachment handling (adds \r\n because we don't know if the text file has one at the end or not) * Fixed the user -> @domain (now adds domain before adding <> around address) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1377 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/smtp.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/functions/smtp.php b/functions/smtp.php index d531f1dc..64db214a 100644 --- a/functions/smtp.php +++ b/functions/smtp.php @@ -59,12 +59,10 @@ } else { + if (strpos($array[$i], '@') === false) + $array[$i] .= '@' . $domain; $array[$i] = '<' . $array[$i] . '>'; } - - if (strpos($array[$i], '@') === false) { - $array[$i] .= '@' . $domain; - } } return $array; } @@ -78,6 +76,9 @@ if (isMultipart()) { foreach ($attachments as $info) { +// echo "
Attachment Info:\n";
+//	    var_dump($info);
+//	    echo "\n
\n"; if (isset($info['type'])) $filetype = $info['type']; else @@ -99,6 +100,7 @@ $tmp = str_replace("\r\n", "\n", $tmp); $tmp = str_replace("\r", "\n", $tmp); $tmp = str_replace("\n", "\r\n", $tmp); + $tmp .= "\r\n"; fputs($fp, $tmp); $length += strlen($tmp); } -- 2.25.1