From: ondrass Date: Tue, 30 Oct 2001 13:43:09 +0000 (+0000) Subject: add support for qmail-inject (qmail-inject doesn't accept -t param) X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e957cd4ae403bc52c71f8f07bfdcf65f4900365b;p=squirrelmail.git add support for qmail-inject (qmail-inject doesn't accept -t param) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1657 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/smtp.php b/functions/smtp.php index fd179db6..3bd9d4d2 100644 --- a/functions/smtp.php +++ b/functions/smtp.php @@ -338,9 +338,13 @@ $envelopefrom = ereg_replace("[[:space:]]",'', $envelopefrom); $envelopefrom = ereg_replace("[[:cntrl:]]",'', $envelopefrom); - // open pipe to sendmail - $fp = popen (escapeshellcmd("$sendmail_path -t -f$envelopefrom"), 'w'); - + // open pipe to sendmail or qmail-inject (qmail-inject doesn't accept -t param) + if (strstr($sendmail_path, "qmail-inject")) { + $fp = popen (escapeshellcmd("$sendmail_path -f$envelopefrom"), "w"); + } else { + $fp = popen (escapeshellcmd("$sendmail_path -t -f$envelopefrom"), "w"); + } + $headerlength = write822Header ($fp, $t, $c, $b, $subject, $more_headers); $bodylength = writeBody($fp, $body);