View Full Version : how to put sendmail ?

10-06-2003, 05:54 PM

i got UNIX hosting wiht perl/cgi/PHP..

now they have sent me the PHp sendmail settings..which is


and i have the code from a site as

$to = "email@yahoo.com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body))
echo("<p>Message sent!</p>");
echo("<p>Message delivery failed...</p>");

now where and how to put my send mail line in this above php mail script to run it?make it send an emal to email@yahoo.com??

10-06-2003, 06:18 PM
you shoudnt need to place the sendmail line, as the PHP mail() function should use it automatically... If not, you may need to look into fsockopen() method, or recomplile php with SMTP? im not sure tho.