how to send mail without human intervention?

Ken Moffat kmoffat
Mon May 17 11:37:59 PDT 2004


Net Llama! wrote:
> I'm writing a bash script where I need to send email out depending on 
> certain conditions within the script.
> 
> I'm thought that I could use 'mail' to do the job, but it seems to 
> require human intervention to send the message out.  I'm trying:
> mail -n -s "another test of mail" netllama at linux-sxs.org

got PHP?

<?php
$to = "netllama at linux-sxs.org";
$subject = "Alert from Page";
$body = "Page condition met!";
mail($to,$subject",$body);
?>


bool mail ( string to, string subject, string message [, string 
additional_headers [, string additional_parameters]])

-- 
Ken Moffat
kmoffat at drizzle.com




More information about the Linux-users mailing list