<?php
ini_set( 'display_errors', 1 );
error_reporting( E_ALL );
$hn = gethostname();
$from = "root@$hn";
$to = "testmail@hts.ru";
$subject = "Nagios test mail working";
$t = time();
$message = "SENDTIME $t";
$headers = "Return-Path: tekuchev@hts.ru \nFrom: " . $from;
mail($to,$subject,$message, $headers);
?>