File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2036,15 +2036,15 @@ protected function SMTPAuthenticate()
20362036 $ this ->SMTPAuthMethod = strtolower ($ this ->SMTPAuthMethod );
20372037
20382038 // Validate supported authentication methods
2039- $ validMethods = ['login ' , 'plain ' ];
2040- if (! in_array ($ this ->SMTPAuthMethod , $ validMethods , true )) {
2039+ if (! in_array ($ this ->SMTPAuthMethod , ['login ' , 'plain ' ], true )) {
20412040 $ this ->setErrorMessage (lang ('Email.invalidSMTPAuthMethod ' , [$ this ->SMTPAuthMethod ]));
20422041
20432042 return false ;
20442043 }
20452044
2045+ $ upperAuthMethod = strtoupper ($ this ->SMTPAuthMethod );
20462046 // send initial 'AUTH' command
2047- $ this ->sendData ('AUTH ' . strtoupper ( $ this -> SMTPAuthMethod ) );
2047+ $ this ->sendData ('AUTH ' . $ upperAuthMethod );
20482048 $ reply = $ this ->getSMTPData ();
20492049
20502050 if (str_starts_with ($ reply , '503 ' )) { // Already authenticated
@@ -2053,7 +2053,7 @@ protected function SMTPAuthenticate()
20532053
20542054 // if 'AUTH' command is unsuported by the server
20552055 if (! str_starts_with ($ reply , '334 ' )) {
2056- $ this ->setErrorMessage (lang ('Email.failureSMTPAuthMethod ' , [strtoupper ( $ this -> SMTPAuthMethod ) ]));
2056+ $ this ->setErrorMessage (lang ('Email.failureSMTPAuthMethod ' , [$ upperAuthMethod ]));
20572057
20582058 return false ;
20592059 }
You can’t perform that action at this time.
0 commit comments