SMTP weirdness ... need help please...

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

SMTP weirdness ... need help please...

Postby mikesz » 19. September 2007 04:14

Hello and greetings,

I initially piggybacked another thread because I thought this issue was similar but as I read it today, I think it deserves its own space, sorry for the posting in error.

I have migrated an XP windows install from Apache2Triad to xampp and every things seems to have gone well except for an annoying problem with php mail() and SMTP. I get the following error when I try to do any call to php mail() function:

Warning: mail() [function.mail]: SMTP server response: 551 User not local; please try <forward-path> in C:\xampp\htdocs\testmail.php on line 11

The bizarre piece is that I am able to run the email form in the localhost/xampp page, put ANYTHING in it for local or otherwise email addresses and it just sends the email without any problem at all.

Can anyone shed some light on this perplexing problem? PHP mail() worked fine in my Apache2Triad installation without the local user error???

I even did a cut and paste of the PHP mail call from the form that works and it gives me that same error message.

My test script is a no brainer actually:

$mailtos = "";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "";
$header = "From: $from";
if (mail($mailtos, $subject, $message, $header)) {
echo "<i>mail-sendok</i>";
} else {
echo "<i>mail-sendnotok</i>";

I have used every reference I can think of to point the smtp in php.ini to my ISP server and nothing works? It did work correctly when I had Apache2Triad installed but xampp seems to have a problem with it.

Here is the php.ini piece, fyi:

[mail function]
; For Win32 only.
smtp_port = 25

; For Win32 only.
sendmail_from =

Any light at all will be greatly appreciated, kindest regards, mikesz
Posts: 2
Joined: 18. September 2007 17:15

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 35 guests