Avoid using 'gethostname()' which is not always available.

SVN:trunk[1041]
This commit is contained in:
Denis Flaven
2011-01-03 14:38:58 +00:00
parent 3b629ab83c
commit 8145c23899

View File

@@ -237,7 +237,7 @@ class ActionEmail extends ActionNotification
$sBody = MetaModel::ApplyParams($this->Get('body'), $aContextArgs);
$oObj = $aContextArgs['this->object()'];
$sServerIP = gethostbyname(gethostname());
$sServerIP = $_SERVER['SERVER_ADDR']; //gethostbyname(gethostname());
$sReference = '<iTop/'.get_class($oObj).'/'.$oObj->GetKey().'@'.$sServerIP.'>';
$oEmail = new EMail();