File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
libs/controller/components
tests/cases/libs/controller/components Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -680,10 +680,14 @@ function __smtp() {
680
680
return false ;
681
681
}
682
682
683
+ $ httpHost = env ('HTTP_HOST ' );
684
+
683
685
if (isset ($ this ->smtpOptions ['client ' ])) {
684
686
$ host = $ this ->smtpOptions ['client ' ];
687
+ } elseif (!empty ($ httpHost )) {
688
+ $ host = $ httpHost ;
685
689
} else {
686
- $ host = env ( ' HTTP_HOST ' ) ;
690
+ $ host = ' localhost ' ;
687
691
}
688
692
689
693
if (!$ this ->__smtpSend ("HELO {$ host }" , '250 ' )) {
Original file line number Diff line number Diff line change @@ -478,10 +478,9 @@ function testSmtpSendSocket() {
478
478
$ response = $ this ->Controller ->EmailTest ->smtpSend ('HELO ' , '250 ' );
479
479
$ this ->assertPattern ('/501 Syntax: HELO hostname/ ' , $ this ->Controller ->EmailTest ->smtpError );
480
480
481
- $ this ->Controller ->EmailTest ->smtpError = null ;
481
+ $ this ->Controller ->EmailTest ->reset () ;
482
482
$ response = $ this ->Controller ->EmailTest ->smtpSend ('HELO somehostname ' , '250 ' );
483
483
$ this ->assertNoPattern ('/501 Syntax: HELO hostname/ ' , $ this ->Controller ->EmailTest ->smtpError );
484
-
485
484
}
486
485
/**
487
486
* testSendDebug method
You can’t perform that action at this time.
0 commit comments