failed to connect mail server

Problems with the Windows version of XAMPP, questions, comments, and anything related.

failed to connect mail server

Postby maryum » 19. November 2008 10:41

hi

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"

and if i try to turn on the mercury services, apache services stop.

can any one help me


thnx
maryum
 
Posts: 4
Joined: 19. November 2008 10:25

Re: failed to connect mail server

Postby Sharley » 19. November 2008 10:52

maryum wrote:...and if i try to turn on the mercury services, apache services stop...
Look in the MercuryMail configurations find and disable the MercuryMail web server or change the port to other than 80, then you will be able to run both MercuryMail and the Apache server - doing this does not effect MercuryMail sending and receiving mail.

MercuryMail by default uses port 80 for a server which must be disabled to use Apache, who also wants to use port 80 which = conflict.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Postby maryum » 19. November 2008 11:03

thnx a lot u solved my prob
maryum
 
Posts: 4
Joined: 19. November 2008 10:25

Postby elwizard » 19. November 2008 11:22

Thank you Sharley. This helped to me too.
User avatar
elwizard
 
Posts: 5
Joined: 19. November 2008 10:18
Location: Spain


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 107 guests