Sendmail not working when headers not specified

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

Sendmail not working when headers not specified

Postby dracan » 10. April 2010 14:08

Hi. I'm having trouble getting my local XAMPP server to send emails via my remote SMTP server.

In PHP, if I put:

$headers = "From: dan@fromdomain.com\r\n";
mail('dan@todomain.com', 'test', '', $headers);

Then this works. However, if I don't specify the header, ie.:

mail('dan@todomain.com', 'test', '');

Then this fails. The sendmail.log file says:

smtpstatus=554 smtpmsg='554 Message refused.' errormsg='the server did not accept the mail' exitcode=EX_UNAVAILABLE

I've tried changing my sendmail command in my php.ini to:

sendmail_path = "C:/xampp/sendmail/sendmail.exe -t -f dan@fromdomain.com"

but this doesn't work either.

Thanks for any help with this,
Dan.

ps. this is on windows.
dracan
 
Posts: 8
Joined: 12. March 2010 12:55

Re: Sendmail not working when headers not specified

Postby MC10 » 12. April 2010 00:52

Configure your sendmail.ini in the sendmail folder. See this post for more info: http://community.apachefriends.org/f/viewtopic.php?f=16&t=39649#p157913
MC10
 
Posts: 148
Joined: 20. February 2010 20:13


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 86 guests