501 5.1.8 Domain of sender address httpd@ns.serverdomain.net does not exist
Hi there, I've got an urgent problem with my on-site emailing function. It appears much of the email is getting through to the recipients, but a significant proportion isn't - which is a worry!I'm using a php script with the mail() function
PHP Code:
mail($toaddress, $subject, $content, $fromaddress);
----- The following addresses had permanent fatal errors -----
orders@companywebsite.com
(reason: 501 5.1.8 Domain of sender address httpd@ns.serverdomain.net does not
exist)
----- Transcript of session follows -----
... while talking to mail.aiuk.net.:
>>> MAIL From:<httpd@ns.serverdomain.net> SIZE=1177
<<< 501 5.1.8 Domain of sender address httpd@ns.serverdomain.net does not exist
501 5.6.0 Data format error
I'm guessing this is a spam check thing - but i can ping 'ns.serverdomain.net' (identity removed to protect the innocent!) and it works in the browser (comes up with raq default page).
Would adding a "-f real@email.address" to the mail() function help matters? Or should i set up a record for ns.serverdomain.net in the DNS records for that domain? I wasn't sure what effect that would have, being the primary nameserver anyway.
If anyone could shed some light, that would be great! I'm only really still a newbie!
many thanks,
-db