You are here: Re: Strange php mail problem « PHP Programming Language « IT news, forums, messages
Re: Strange php mail problem

Posted by Geoff Muldoon on 10/19/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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация