I'm having trouble getting my local XAMPP server to send emails via my remote SMTP server.
In PHP, if I put:
$headers = "From: email@example.com\r\n"; mail('firstname.lastname@example.org', 'test', '', $headers);
Then this works. However, if I don't specify the header, ie.:
mail('email@example.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 firstname.lastname@example.org"
but this doesn't work either.
Thanks for any help with this, Dan.
ps. this is on windows.