Sendmail Troubles
| From: | Toby McNulty | Date: | Sat, 19 Aug 2000 18:57:03 +0000 |
| Subject: | Sendmail Troubles | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-12597@lists.php.net to get a copy of this message | ||
For some time I have been accessing sendmail by opening a stream to it with
popen(), writing to it with fwrite(), and then closing it with pclose().
The other day, however, I discovered that if I group the sendmail access
functions inside too many code segments ( { }s: ifs, whiles, anything ),
the e-mail does _not_ go through and the following message is printed (I'm
guessing) by sendmail:
Failed to send message to any users
I was referred to the mail() function by someone on #php, but to my
surprise, this function printed the exact same error as my previous methods
for sending e-mail.
In the end I resorted to writing a bash script to open sendmail and
redirect the mail data. This also only works using ``s though, popen,
fwrite, and pclose produce (again) the same error as my two previous
attempts. Any ideas? I'm running PHP 3.0.6 on SunOS 5.7 Generic_106541-11
sun4u sparc SUNW,Ultra-250.
Toby McNulty
Xorsis Software
Software Development and Web Hosting services
mailto:toby@xorsis.com
http://www.xorsis.com