We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60a1e65 commit 8d7c267Copy full SHA for 8d7c267
system/Email/Email.php
@@ -2058,10 +2058,13 @@ protected function SMTPAuthenticate()
2058
$authString = "\0" . $this->SMTPUser . "\0" . $this->SMTPPass;
2059
2060
$this->sendData('AUTH PLAIN ' . base64_encode($authString));
2061
- $reply = $this->getSMTPData();
2062
2063
- if (! str_starts_with($reply, '235') || ! str_starts_with($reply, '503')) {
2064
- $this->setErrorMessage(lang('Email.failedSMTPLogin', [$reply]));
+ if (str_starts_with($this->getSMTPData(), '503')) { // Already authenticated
+ return true;
+ }
2065
+
2066
+ if (! str_starts_with($this->getSMTPData(), '235')) {
2067
+ $this->setErrorMessage(lang('Email.failedSMTPLogin', [$this->getSMTPData()]));
2068
2069
return false;
2070
}
0 commit comments