maryum Posted November 19, 2008 Share Posted November 19, 2008 hello i m trying to send mail through php the code is given below " <?php ini_set("SMTP", "127.0.0.1"); ini_set("smtp_port", 25); $to = $_POST['to']; $from = $_POST['from']; $subj = $_POST['subj']; $msg = $_POST['msg']; $header = "MIME version: 1.0\r\n"; $header .= "Conttent-type:text/html;charset=ISO-8859-1\r\n"; $header .= "From:$from \r\n"; $header .= "Cc: $cc \r\n"; $header .= "Bcc: $bcc \r\n"; $header .= "Reply-to: <$from>\r\n"; $header .= "X-Mailer: PHP/".phpversion(); ini_set("SMTP", "127.0.0.1"); ini_set("smtp_port", 25); mail($to, $subject, $body, $header); ?>" but following error occours "Warning: mail() [function.mail]: Failed to connect to mailserver at "127.0.0.1" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in D:\xampp\htdocs\mailing\srvrsendmail.php on line 19" can any one help me thnx Quote Link to comment Share on other sites More sharing options...
ratcateme Posted November 19, 2008 Share Posted November 19, 2008 do you have a mail server running? you need to turn on mercury in your xampp control panel. Scott. Quote Link to comment Share on other sites More sharing options...
maryum Posted November 19, 2008 Author Share Posted November 19, 2008 if i tutrn it on than papche services stop, i have reinstalled it but the problem remains there Quote Link to comment Share on other sites More sharing options...
ratcateme Posted November 19, 2008 Share Posted November 19, 2008 try this forum to get the problem with xampp sorted then you should be able to send mail http://www.apachefriends.org/f/viewforum.php?f=16 Scott. Quote Link to comment Share on other sites More sharing options...
maryum Posted November 19, 2008 Author Share Posted November 19, 2008 i'll chek it out thnx Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.