<?php function sendMail($email, $subject, $content, $replyTo=null) { $header="From: adres@wp.plr\n"; $header.="Mime-Version: 1.0r\n"; $header.="Content-type: text/html; charset=ISO-8859-2r\n"; $header.="Content-Transfer-Encoding: 8bitr\n"; $subject=iconv("UTF-8","ISO-8859-2", $subject); $footer='stopka'; $content=iconv("UTF-8","ISO-8859-2", $content.$footer); } sendMail($email,$subject,$content,$replyTo=null); ?>
Po odpaleniu stronki pojawia się error:
Warning: mail() [function.mail]: Failed to connect to mailserver at "smtp.wp.pl" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xxx\mail.php on line 17
php.ini wygląda następująco:
[mail function]
; For Win32 only.
SMTP = smtp.wp.pl
smtp_port = 25
; For Win32 only.
sendmail_from = adres@wp.pl
Co jest nie tak? Czego brakuje?
Dzięki.