send mail

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

send mail

Postby mrisjny » 05. August 2010 10:39

Hi,
I'm Currently having problems sending mail using the Mercury mail Server
I've also read some of the other problems with the mercury mail but non seemed to yeild a solution to my problem

Problem:
Using this script:
Code: Select all
<?php
$to = "test@localhost";
$subject = "My subject";
$txt = "Hello world!";
$headers = "From: webmaster@localhost" . "\r\n" .
"CC: test@127.0.0.1";


if(mail($to,$subject,$txt,$headers))
   echo'<p>Mail Sent</p>';
else
   echo'<p>ERROR</p>';
?>

PHP reports "Mail Sent" but after investigating sendmail.log i see this error message. "Aug 05 10:21:26 host=localhost tls=off auth=off from=postmaster@localhost recipients=test@localhost,test@127.0.0.1 errormsg='cannot connect to localhost, port 25: Connection refused' exitcode=EX_TEMPFAIL"
However when i send mail directly from Mercury Mail it'self it works fine and thunderbird can recieve it.
Though when i try to reply (to my self, to test the sending ability) thunderbird flicks up with "Sending of message failed. an error occurred sending mail: SMTP server mail.localhost is unknown. The server may be incorrectly configured. Please verify that your SMTP server settings are correct and try again."

But what should i be looking for in Mercury Mail server settings? it looks okay, but i don't really have an idea what i'm looking for.

Port-Check on Xampp reports 25 is Free But should Mercury Mail but be running on that port? but i have turned off my Anti-Virus & Firewall and then started Xampp & Mercury Mail but still the same problem.
mrisjny
 
Posts: 2
Joined: 05. August 2010 09:56

Re: send mail

Postby mrisjny » 05. August 2010 13:03

After a Re-Install yet again of Xampp i'm now getting what appears to be the "mail server error" of:
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:\Users\Johnny\Documents\xampp\htdocs\send_mail.php on line 9

Yet it is actually running, going to report back with anything else i find but just edit this post.
mrisjny
 
Posts: 2
Joined: 05. August 2010 09:56


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 134 guests