Discussion:
mail function problems
Jim Giner
2014-09-11 16:54:08 UTC
Permalink
So - I have used php mail() easily for a long time. I have several
piped scripts that work great, receiving a mail message, grabbing data
from them and creating a mail message for me that always arrives.
Recently I attempted to create a new mailbox for new mail messages and
to have a copy of the working script/template do the same thing again
for me. But - it doesn't work. The email reports true of course, but
the email fails to arrive at my mailbox.

Found the mail.log ini setting and got it setup. Have two little test
scripts running in diff folders that both find the mail.log file
specified in the php.ini file in the one correct place and they both
write an entry to it. BUT - my troubled script from above a) can't see
the mail.log file (ini_get fails to return a value at all) and b) I
still don't get an email

Is there something about a script triggered via an email (a pipe) that
prevents it from seeing/using the same php.ini settings? The piped
script has an ini file in its directory that points to the same file as
the two test scripts. Even one of these test scripts resides in the
same folder as my piped-to script. But the one triggered by email can't
see the ini setting.

Please don't tell me to move to phpmailer. Can't seem to find an
install that loads for me. Don't know why. Most of the writeups I read
and tried (3 times!) don't match the results I get so I end up removing
them. Besides - I have no difficulties using mail() usually. This is
the first time my template has failed me and I'm losing my hair trying
to figure it out. Thought perhaps the mail.log feature could help me
and now even that doesn't work.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Robert Cummings
2014-09-13 16:31:09 UTC
Permalink
Post by Jim Giner
So - I have used php mail() easily for a long time. I have several
piped scripts that work great, receiving a mail message, grabbing data
from them and creating a mail message for me that always arrives.
Recently I attempted to create a new mailbox for new mail messages and
to have a copy of the working script/template do the same thing again
for me. But - it doesn't work. The email reports true of course, but
the email fails to arrive at my mailbox.
Found the mail.log ini setting and got it setup. Have two little test
scripts running in diff folders that both find the mail.log file
specified in the php.ini file in the one correct place and they both
write an entry to it. BUT - my troubled script from above a) can't see
the mail.log file (ini_get fails to return a value at all) and b) I
still don't get an email
Is there something about a script triggered via an email (a pipe) that
prevents it from seeing/using the same php.ini settings? The piped
script has an ini file in its directory that points to the same file as
the two test scripts. Even one of these test scripts resides in the
same folder as my piped-to script. But the one triggered by email can't
see the ini setting.
Please don't tell me to move to phpmailer. Can't seem to find an
install that loads for me. Don't know why. Most of the writeups I read
and tried (3 times!) don't match the results I get so I end up removing
them. Besides - I have no difficulties using mail() usually. This is
the first time my template has failed me and I'm losing my hair trying
to figure it out. Thought perhaps the mail.log feature could help me
and now even that doesn't work.
Are you certain you're piped script is being executed? Have you checked
its working directory location when run (getcwd())?

Cheers,
Rob.
--
Phone: 613-822-9060 +++ Cell: 613-600-2836
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jim Giner
2014-09-13 17:00:20 UTC
Permalink
Post by Robert Cummings
Are you certain you're piped script is being executed? Have you checked
its working directory location when run (getcwd())?
Cheers,
Rob.
Yes I am. I have calls to error_log that precede and follow my call to
mail() which show up just fine.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Loading...