hi
i'm sure that this might seam very simple but i'm learning php and i' m heaving some difficultyes with understanding the mail() function so thanks for any suddgestion
i'm testing on local the fallowing script:
<?php
/*mail to*/
$destinatari = "*****@msn.com".",";
$destinatari .= "*********@yahoo.com";
/*ogg*/
$oggetto="auguri!";
/*messaggio*/
$messaggio ='<html><head></head><body>
<p>tanti auguroni!!</p>
<p>da ma ....a te...</p>
</body>
</html>';
/*per inviare email in formato html, si deve impostare l' intestazione Content-type.*/
$intestazione="MIME-Version: 1.0\r1n";
$intestazione="Content-type: text/html;charset=iso-8859-1\r\n";
/*send mail*/
mail($destinatari, $oggetto, $messaggio,"From: webmaster@{$_SERVER['SERVER_NAME']}", $intestazione);
?>
in output it prints the fallowing error:
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in D:.....\mail.php on line 18
i'm using a guide book for learning php and as if this script is imported from the books cd (it wasn't me writting it), i'm trying to figure out what is wrong with it
could u pls tell me what should i change?
thanks for any help