Skip to content

Commit

Permalink
Merge pull request PHPMailer#185 from ojovirtual/patch-1
Browse files Browse the repository at this point in the history
Update class.phpmailer.php
  • Loading branch information
Synchro committed Feb 14, 2014
2 parents 338dd08 + 8a46f63 commit 56842bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion class.phpmailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2730,8 +2730,10 @@ protected function serverHostname()
$result = $this->Hostname;
} elseif (isset($_SERVER) and array_key_exists('SERVER_NAME', $_SERVER) and !empty($_SERVER['SERVER_NAME'])) {
$result = $_SERVER['SERVER_NAME'];
} elseif (gethostname() !== false) {
} elseif (function_exists("gethostname") && gethostname() !== false) {
$result = gethostname();
}elseif (php_uname("n") !== false){
$result = php_uname("n");
}
return $result;
}
Expand Down

0 comments on commit 56842bf

Please sign in to comment.