Re: mail function from and reply to address problem
| From: | Tanner Postert | Date: | Fri, 13 Jul 2007 19:03:16 +0000 |
| Subject: | Re: mail function from and reply to address problem | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-258811@lists.php.net to get a copy of this message | ||
mail function returns 1(true) whether or not i'm sending to the new virtual
host domain name or any random domain name.
turns out sendmail function does the same thing, so it looks like it's a
sendmail problem... but how is that possible if i've never configured
anything for this new domain except for http virtual host config? hmm.
On 7/13/07, Tanner Postert <tanner.postert@gmail.com> wrote:
apache is definitely listed in the trusted users, as I mentioned, I can send from dozens of other domains, its just one specific domain that I can't. i'll let you know the results of sending the email from outside of php. On 7/12/07, Chris <dmagick@gmail.com> wrote: Richard Lynch wrote:On Thu, July 12, 2007 6:33 pm, Tanner Postert wrote:machine,You really ought to be getting the return value from mail() and checking it for success... Error-checking is good. :-)I am currently running PHP 5.1.4 Fedora Core 5 i'm trying to exectute the following test script. <?php$to = 'my.email@address.com';$subject = 'the subject'; $message = 'body'; $headers = 'From: webmaster@domain.com' . "\r\n" .'Reply-To: webmaster@domain.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion();mail($to, $subject, $message, $headers); ?>i have about 10 or so different virtual hosts running on thisfine,and if i use any of them for the from & reply-to addresses, it worksor even if i use domains I don't control like aol.com or example.com those work too, but one particular new virtual host doesn't work, it re-writes the from address to the default virtual host address. which is strange becauseWhich is mentioned in the documentation: http://www.php.net/manual/en/function.mail.php ;) Sendmail and exim definitely have this sort of problem, I don't think postfix or qmail do though. -- Postgresql & php tutorials http://www.designmagick.com/As I understand it: If the PHP (read: Apache) User is not "trusted" in sendmail config, then sendmail won't let that user forge the return headers, and the return comes from the default set in sendmail configuration.that isn't in the php.ini anywhere, but it could just be taking the hostname. anyone have any ideas?