note 29628 added to ref.mail
| From: | Scott at rack1 dot php dot net | Date: | Wed, 19 Feb 2003 15:33:56 +0000 |
| Subject: | note 29628 added to ref.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-44209@lists.php.net to get a copy of this message | ||
This is for any Unix or Linux machine using the Sendmail. However, no guarentee that it would work
in Windows.
Some SMTP won't accept e-mail with the "From: host@domain" without the suffix
"com", like "domain.com", so using the "From: host@domain.com" option
in the $header does not solve the problem for me.
Someone suggest using the php.ini with the configuration by adding the "-f
user@domain.com" to the sendmail path. Example look like this....
--clip--
sendmail_path = /usr/sbin/sendmail -t -i -f user@domain.com
--clip--
This is not an option for me because it is limit to one user, not more than one. So, Finally there
is a workaround to the problem and it is very simple.... Just add this entrie to the /etc/hosts
file in Unix or Linux. Just substitute the word in bracket for a value....
--clip--
<ip address> <machine's_host.domain.com>
--clip--
Example ...
--clip--
123.456.789.012 xyz.abc.com
--clip--
Make sure your machine do the search order with the host first before the DNS or Nameserver. In my
case in AIX, is "/etc/netsvc.conf".
Hope
Make sure your machine is set to read the host file first before the DNS or the nameserver, if not
then make some changes to it. In my case for AIX, it is "/etc/netsvc.conf"...
Hope this help....
--
http://www.php.net/manual/en/ref.mail.php
http://master.php.net/manage/user-notes.php?action=edit+29628
http://master.php.net/manage/user-notes.php?action=delete+29628
http://master.php.net/manage/user-notes.php?action=reject+29628