diff options
-rw-r--r-- | src/etc/inc/functions.inc | 2 | ||||
-rw-r--r-- | src/etc/inc/smtp.inc | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/etc/inc/functions.inc b/src/etc/inc/functions.inc index c5636fa..026d7fb 100644 --- a/src/etc/inc/functions.inc +++ b/src/etc/inc/functions.inc @@ -86,7 +86,7 @@ if (!function_exists("pfSenseHeader")) { if ($_SERVER['SERVER_PORT'] == "443" && $protocol == "https") { $port = ""; } - $complete_url = "{$protocol}://{$_SERVER['SERVER_NAME']}{$port}/{$text}"; + $complete_url = "{$protocol}://{$_SERVER['HTTP_HOST']}{$port}/{$text}"; echo "\ndocument.location.href = '{$complete_url}';\n"; } else { header("Location: $text"); diff --git a/src/etc/inc/smtp.inc b/src/etc/inc/smtp.inc index de5522c..48872d8 100644 --- a/src/etc/inc/smtp.inc +++ b/src/etc/inc/smtp.inc @@ -1243,7 +1243,7 @@ class smtp_class if($this->debug) $this->OutputDebug("Connected to SMTP server \"".$domain."\"."); if(!strcmp($localhost=$this->localhost,"") - && !strcmp($localhost=getenv("SERVER_NAME"),"") + && !strcmp($localhost=getenv("HTTP_HOST"),"") && !strcmp($localhost=getenv("HOST"),"")) $localhost="localhost"; $success=0; @@ -1889,4 +1889,4 @@ class smtp_class */ -?>
\ No newline at end of file +?> |