Re: Possible issue in mail() function?
| From: | Richard Quadling | Date: | Fri, 26 Nov 2010 14:54:12 +0000 |
| Subject: | Re: Possible issue in mail() function? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-309684@lists.php.net to get a copy of this message | ||
On 25 November 2010 21:30, Tom Hendrikx <tom+php.net@whyscream.net> wrote:
> Hi,
>
> I noticed that the mail() function in php 5.3.3 on gentoo linux triggers
> a warning when used. A simple debug script with the contents:
>
> <?php
> // recipient, subject, body
> mail("some@example.com", "mail() test", "This is a test");
> ?>
>
> does send mail, but it also raises a warning:
>
> Warning: mail(1): failed to open stream: Permission denied in
> /var/www/www.example.com/htdocs/test-mail/index.php on line 5
>
> After some googling [1] and fiddling with permissions, the message
> disappears when php has write permissions to the file
> /var/www/www.example.com/htdocs/test-mail/1 , in which it writes the
> following data:
>
> ==8<==
> mail() on [/var/www/www.example.com/htdocs/test-mail/index.php:5]: To:
> some@example.com -- Headers:
> ==8<==
>
> Is this some debug output that someone forgot to remove?
>
> When relevant, the sendmail_path used is "/usr/sbin/sendmail -t -i",
> which is a regular Postfix sendmail.
>
> [1] http://stackoverflow.com/questions/1906403
>
> --
> Kind regards,
> Tom Hendrikx
Are you logging your emails via the ini setting mail.log? Maybe this
is the issue.
--
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY