From 8f8f3a4e5828049bc3acddc40496846e50650ac1 Mon Sep 17 00:00:00 2001 From: jmunro Date: Wed, 13 Feb 2002 21:02:00 +0000 Subject: [PATCH] Fixed bug with double error messages git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2438 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/smtp.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/functions/smtp.php b/functions/smtp.php index d3c6de38..13ffe93b 100644 --- a/functions/smtp.php +++ b/functions/smtp.php @@ -557,11 +557,6 @@ function sendSMTP($t, $c, $b, $subject, $body, $more_headers) { $tmp = fgets($smtpConnection, 1024); $num = errorCheck($tmp, $smtpConnection, true); if ($num != 250) { - $tmp = nl2br(htmlspecialchars($tmp)); - displayPageHeader($color, 'None'); - include_once('../functions/display_messages.php'); - $msg = "Message not sent!
\nReason given: $tmp"; - plain_error_message($msg, $color); return(0); } @@ -574,7 +569,7 @@ function sendSMTP($t, $c, $b, $subject, $body, $more_headers) { function errorCheck($line, $smtpConnection, $verbose = false) { - global $color; + global $color, $compose_new_win; /* Read new lines on a multiline response */ $lines = $line; @@ -666,7 +661,12 @@ function errorCheck($line, $smtpConnection, $verbose = false) { if ($status == 0) { include_once('../functions/page_header.php'); - displayPageHeader($color, 'None'); + if ($compose_new_win == '1') { + compose_Header($color, 'None'); + } + else { + displayPageHeader($color, 'None'); + } include_once('../functions/display_messages.php'); $lines = nl2br(htmlspecialchars($lines)); $msg = $message . "
\nServer replied: $lines"; -- 2.25.1