Bläddra i källkod

Very ugly hack to add rudimentary error check to SMTP for invalid/unsupported auth types. I don't like it, not one bit. It will do until I can fix up a better solution tomorrow though, right now I'm very tired and it's time for bed..

tassium 22 år sedan
förälder
incheckning
4f914fc1a4
1 ändrade filer med 8 tillägg och 1 borttagningar
  1. 8 1
      class/deliver/Deliver_SMTP.class.php

+ 8 - 1
class/deliver/Deliver_SMTP.class.php

@@ -128,7 +128,14 @@ class Deliver_SMTP extends Deliver {
 	  if ($this->errorCheck($tmp, $stream)) {
     	return(0);
 	  }
-	}
+	} else {
+		/* Right here, they've reached an unsupported auth mechanism.
+		   This is the ugliest hack I've ever done, but it'll do till I can fix
+		   things up better tomorrow.  So tired... */
+		if ($this->errorCheck("535 Unable to use this auth type",$stream)) {
+			return(0);
+		}
+    }
     
 	/* Ok, who is sending the message? */
         fputs($stream, 'MAIL FROM: <'.$from->mailbox.'@'.$from->host.">\r\n");