Hi,
i have got it working but had to write a seperate query to get hostname. it is hard to write a step by step as you can customize it to however you want and use any mail protocol, i am using sendmail/mailutils - below is what i did.
edit the file …/fog/service/Post_Stage3.php
just before line: echo “##”; write you’re mail function i.e.
if ( checkOut( $conn, $jobid ) )
{
[B]mail(“emailaddress@tosendto”,“$hostname - Image Task Completed”, “$hostname has been successfully imaged”);[/B]
echo “##”;
// Now update the imaging log.
@logImageTask( $conn, “e”, $hostid );
if you would like to get the hostname in the email - you have to include this, it is another query and there may be a cleaner way to do this but for now put this anywhere before the if statement put…
$hst = “SELECT hostName FROM hosts WHERE hostID like '”.$hostid.“'”;
$res1 = mysql_query( $hst, $conn ) or die( mysql_error() );
$ar1 = mysql_fetch_object($res1);
$hostname = $ar1->hostName;
optional:
on the server install sendmail/mailutils
apt-get install sendmail
apt-get install mailutils
recommend stopping sendmail running a daemon.
hope this helps
…thanks for the guidance Fernando