|
Posted by Geoff Muldoon on 10/09/46 11:22
inforequest@spam-killer-remove-techie.com says...
> How can it be bugs in my code when it works for one address but not
> the other? How can it be a misconfigured mail server when sending
> email the traditional way works just fine? Why would one server reject
> the mail because of how I sent it when the other will not reject it?
>
> See below as to how I am sending the email:
>
> @mail( "$myrow[1]", "password request","You had requested your
> password to be sent to you. You can find your password
> below.\n\nPassword: $myrow[0]", "From: Mail Admin <admin@acme.co>");
Some mail servers will reject mail where an attempt to set a value for the
"from" address in the header (as you have done) is in conflict with the
message's canonical from address (likely to be apache@yourserver).
Try it using the optional fifth parameter in PHP's mail function:
$param='-fadmin@acme.co'; // the -f at the front of the address is needed
mail($to, $subject, $body, $headers, $param);
and see if that fixes it.
Geoff M
Navigation:
[Reply to this message]
|