I have a default installation of WAMP Server 2.0.
I'm trying to send email using this simple script:
<?php
if (mail('[email protected]', 'My Title', 'Some Text')) {
echo "OK";
} else {
echo "Why ??";
}
?>
Unfortunately, I get the following warning:
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:My_Pathsend_email.php on line 3
Why ??
What could be the reason for that ?
I expected sending email to be a very simple task ... :(
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…