File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/Symfony/Component/Mailer/Transport/Smtp Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -180,12 +180,15 @@ private function handleAuth(array $modes): void
180
180
continue ;
181
181
}
182
182
183
+ $ code = 535 ;
183
184
$ authNames [] = $ authenticator ->getAuthKeyword ();
184
185
try {
185
186
$ authenticator ->authenticate ($ this );
186
187
187
188
return ;
188
189
} catch (TransportExceptionInterface $ e ) {
190
+ $ code = $ e ->getCode ();
191
+
189
192
try {
190
193
$ this ->executeCommand ("RSET \r\n" , [250 ]);
191
194
} catch (TransportExceptionInterface ) {
@@ -206,6 +209,6 @@ private function handleAuth(array $modes): void
206
209
$ message .= sprintf (' Authenticator "%s" returned "%s". ' , $ name , $ error );
207
210
}
208
211
209
- throw new TransportException ($ message );
212
+ throw new TransportException ($ message, $ code );
210
213
}
211
214
}
You can’t perform that action at this time.
0 commit comments