Fixed bug with double error messages
authorjmunro <jmunro@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 13 Feb 2002 21:02:00 +0000 (21:02 +0000)
committerjmunro <jmunro@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 13 Feb 2002 21:02:00 +0000 (21:02 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2438 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/smtp.php

index d3c6de3807776b449c0e5c5a583a5d2e1c7e5842..13ffe93be25aa83fee221e8ee0070b046bb71011 100644 (file)
@@ -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!<br>\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 . "<br>\nServer replied: $lines";