Skip to content

Commit 5137cb6

Browse files
committed
fix: add fallback to use gethostname()
[127.0.0.1] is not valid domain parameter.
1 parent e9da460 commit 5137cb6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

system/Email/Email.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2101,6 +2101,11 @@ protected function getHostname()
21012101
return '[' . $_SERVER['SERVER_ADDR'] . ']';
21022102
}
21032103

2104+
$hostname = gethostname();
2105+
if ($hostname !== false) {
2106+
return $hostname;
2107+
}
2108+
21042109
return '[127.0.0.1]';
21052110
}
21062111

0 commit comments

Comments
 (0)