Re: Unable to send mail from PHP to AT&T e-mail address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris wrote:

Any light anyone can throw on the 'nobody@xxxxxxxxxxxx' address would be
most welcome.

It is using the apache user @ your host name as the default.  Try this:

ini_set('sendmail_from', 'whatever@xxxxxxxxxxxx');

I will try this but I do not understand why it should work. I have a 'From:...' entry in my headers. Why is this not being used as the primary from address and why is 'nobody@xxxxxxxxxxxx' being added instead as the first from address ? In other words, I can understand if I supply no 'From:...' header entry that a default 'nobody@xxxxxxxxxxxx' would be used but I do not understand why it is used even when I supply a 'From:...' header entry.


"From: " is used by your mail client to show who it's from.

the ini_set (or you can set the 5th param to the mail() function) is a return-path. If the message bounces (recipient's mailbox full, server down, whatever the reason) it gets delivered to that address. They serve different purposes.

Does ini_set actually change the php.ini file in any way ? The reason I ask is that after putting in:

ini_set('sendmail_from', 'myemail@xxxxxxxxxxxx');

into a new script which I tested out against, the 'mail' function now continues to work but no e-mail is received no matter what the recipient e-mail is. Even is I go back to using my old script which does not have the 'ini_set' in it, no e-mail actually gets receoved even though 'mail' succeeds when called. So I have gone from bad to worse and the ini_set seems to have affected all calls to 'mail' in this way for PHP scripts on the server.

Can I correct but somehow stopping PHP ( or may Apache ) and restarting it again to bring back the original php.ini setting ?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux