Properly detect EOF in SmtpEmailTransport::read()
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 11 Jan 2021 11:18:00 +0000 (12:18 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 11 Jan 2021 11:18:49 +0000 (12:18 +0100)
wcfsetup/install/files/lib/system/email/transport/SmtpEmailTransport.class.php

index d68d456d589395f8c5aa5d3d9250726c331cea4d..59e710f49b1938d6e796b00086147ee9d1ec1f4d 100644 (file)
@@ -201,6 +201,10 @@ class SmtpEmailTransport implements IEmailTransport {
                                }
                        }
                        else {
+                               if ($this->connection->eof()) {
+                                       throw new TransientFailure("Unexpected EOF / connection close from SMTP server.");
+                               }
+                               
                                throw new TransientFailure("Unexpected reply '".$data."' from SMTP server.");
                        }
                }