File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,12 @@ protected function connect(): void
155
155
stream_set_timeout ($ this ->connection , $ this ->timeout , 0 );
156
156
$ this ->read (); // greeting
157
157
158
+ $ this ->write ("EHLO $ this ->clientHost " );
159
+ $ ehloResponse = $ this ->read ();
160
+ if ((int ) $ ehloResponse !== 250 ) {
161
+ $ this ->write ("HELO $ this ->clientHost " , 250 );
162
+ }
163
+
158
164
if ($ this ->secure === 'tls ' ) {
159
165
$ this ->write ('STARTTLS ' , 220 );
160
166
if (!stream_socket_enable_crypto (
@@ -167,12 +173,6 @@ protected function connect(): void
167
173
$ this ->write ("EHLO $ this ->clientHost " , 250 );
168
174
}
169
175
170
- $ this ->write ("EHLO $ this ->clientHost " );
171
- $ ehloResponse = $ this ->read ();
172
- if ((int ) $ ehloResponse !== 250 ) {
173
- $ this ->write ("HELO $ this ->clientHost " , 250 );
174
- }
175
-
176
176
if ($ this ->username != null && $ this ->password != null ) {
177
177
$ authMechanisms = [];
178
178
if (preg_match ('~^250[ -]AUTH (.*)$~im ' , $ ehloResponse , $ matches )) {
You can’t perform that action at this time.
0 commit comments