http://kursphp.com/wysylanie_email.php
obydwa kody z tej lekcji mi nie działają, mimo że przerobiłem drugi kod na:
Kod
<?php
$od = "From: zenekbochenek@jojo.com \r\n";
$od .= 'MIME-Version: 1.0'."\r\n";
$od .= 'Content-type: text/html; charset=iso-8859-2'."\r\n";
$adres = "ha4fun@onet.pl";
$tytul = "wiadomosctestowa";
$wiadomosc = "<html>
<head>
</head>
<body>
<b>Witam serdecznie!</b><br/>
<a>gfsdgdsgfasfafdsfasfas</a>
</body>
</html>";
// użycie funkcji mail
mail($adres, $tytul, $wiadomosc, $od);
?>
$od = "From: zenekbochenek@jojo.com \r\n";
$od .= 'MIME-Version: 1.0'."\r\n";
$od .= 'Content-type: text/html; charset=iso-8859-2'."\r\n";
$adres = "ha4fun@onet.pl";
$tytul = "wiadomosctestowa";
$wiadomosc = "<html>
<head>
</head>
<body>
<b>Witam serdecznie!</b><br/>
<a>gfsdgdsgfasfafdsfasfas</a>
</body>
</html>";
// użycie funkcji mail
mail($adres, $tytul, $wiadomosc, $od);
?>
wyskakuje mi błąd:
Kod
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 C:\Program Files\WebServ\httpd\zfilmikow\wysyla.php on line 18
Proszę o pomoc.