View Full Version : Email sending problem

11-04-2007, 03:21 PM
I made a simple Html form which takes user mail info and message and send it.I hav made another php script for the mail to be sent. My code is given below-

echo "Thank You <b>$_POST[name]</b> for ur message";
echo "<p>Your mail address is <p>$_POST[email] </p>";
echo "<p>Your message was <p> $_POST[msg] </p>";
//building the message.
"$msg="Name: $_POST[name]\n";
$msg.="E-mail $_POST[email]\n";
$msg.="Message $_POST[msg]\n";
//set up mail
$subject="Tanvir's Form Submission Results";
$mailheader="From: Tanvirs House <tanvirtonu@yahoo.com>\n";
$mailheader.="Reply to $_POST[email]";
//send the mai



my HTML form code is-

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<form action="Email.php" method="post">
<p>Your Name</p>
<input type="text" name="name">
<p>Mail Address</p>
<input type="text" name="email">
<textarea name="msg" cols="30" rows="10"></textarea>
<input type="submit" value="Send" >


But when I press send button, I cant send the mail, Is says-

" 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:\xampp\htdocs\Email.php on line 24 "

WHAT IS D PROBLEM.How can I know which smtp port my ISP is using.In php.ini file the port value is 25.
What shud I do.pls help.
Edit/Delete Message Reply With Quote Multi-Quote This Message Quick reply to this message

11-04-2007, 03:50 PM
$msg="Name: $_POST[name]\n";
$msg.="E-mail $_POST[email]\n";
$msg.="Message $_POST[msg]\n";

11-04-2007, 07:16 PM
You could call your ISP or use a nifty little site called Google (http://www.google.com).