sendmail -t won't work
| From: | Lars FORNELL | Date: | Fri, 09 Jun 2000 08:13:32 +0000 |
| Subject: | sendmail -t won't work | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-1370@lists.php.net to get a copy of this message | ||
I have a big problem having sendmail to work through PHP scripts.
We have a RedHat6.2 Linux server with Apache 1.3.12 and PHP4 installed.
This is script:
$sendmail = "/usr/lib/sendmail";
$fp = popen( "$sendmail -t", "w");
fwrite($fp, "To: $firstname $lastname <$useremail>\n");
fwrite($fp, "From: Lars FORNELL <lars.fornell@limelab.com>\n");
fwrite($fp, "Subject: Test\n");
fwrite($fp, "Organization: Test\n\n\n");
fwrite($fp, "$subject\n");
pclose($fp);
This is what the maillog looks like:
Jun 8 06:07:03 linux845 sendmail[24641]: GAA24641: to=Lars FORNELL
<lars.fornell@limelab.com>, delay=00:00:00, mailer=local, stat=User
unknown
But no mails get send, maybe because of the "stat=User unknown" in the
log, but how can I avoid that?
Thanks in advance;
Lars