浏览代码

Fixed bug with double error messages

jmunro 23 年之前
父节点
当前提交
c84e4eb418
共有 1 个文件被更改,包括 7 次插入7 次删除
  1. 7 7
      functions/smtp.php

+ 7 - 7
functions/smtp.php

@@ -557,11 +557,6 @@ function sendSMTP($t, $c, $b, $subject, $body, $more_headers) {
     $tmp = fgets($smtpConnection, 1024);
     $tmp = fgets($smtpConnection, 1024);
     $num = errorCheck($tmp, $smtpConnection, true);
     $num = errorCheck($tmp, $smtpConnection, true);
     if ($num != 250) {
     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);
         return(0);
     }
     }
     
     
@@ -574,7 +569,7 @@ function sendSMTP($t, $c, $b, $subject, $body, $more_headers) {
 
 
 
 
 function errorCheck($line, $smtpConnection, $verbose = false) {
 function errorCheck($line, $smtpConnection, $verbose = false) {
-    global $color;
+    global $color, $compose_new_win;
     
     
     /* Read new lines on a multiline response */
     /* Read new lines on a multiline response */
     $lines = $line;
     $lines = $line;
@@ -666,7 +661,12 @@ function errorCheck($line, $smtpConnection, $verbose = false) {
     
     
     if ($status == 0) {
     if ($status == 0) {
         include_once('../functions/page_header.php');
         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');
         include_once('../functions/display_messages.php');
         $lines = nl2br(htmlspecialchars($lines));
         $lines = nl2br(htmlspecialchars($lines));
         $msg  = $message . "<br>\nServer replied: $lines";
         $msg  = $message . "<br>\nServer replied: $lines";