Hi Markus,

do I get you right, you can't invoke mail() because php can't find the sendmail executable?

perhaps this does the trick:

function my_mail_inject($mail)
{
$sendmail = ini_get("sendmail_path");
if(!$sendmail) $sendmail = "/var/qmail/bin/qmail-inject";
$p = popen($sendmail, "w");
if($p)
{
fwrite($p, $mail);
pclose($p);
return 1;
}
return 0;
}
(this is something I acutally use on a beta-production-system.)
$mail must contain a complete mail with all necessary headers.
qmail-inject is ~ equal to sendmail -t (-i is ignored in qmail's sendmail.)
this solution also helpep me out of my dilemma that php reformats mail and adds extra headers and so on.
Here I have full control over all headers :o)


Hope you see your qmail installation in chroot'd env.
else: good luck.

I know it's not an external mta to deliver.
If this does not help you at all have a look at the sources and hack 'em 'till they fit your needs #


Ste'reinvent the wheel'phan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to