note 64322 added to function.mail
| From: | gokulmig at gmail dot com | Date: | Wed, 12 Apr 2006 11:22:35 +0000 |
| Subject: | note 64322 added to function.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-107853@lists.php.net to get a copy of this message | ||
Hi all,
Here is some piece of code which you can make phpmailer work and mail function work with the
qmail-inject
For Making phpmailer work with qmail inject follow the following steps
in class.phpmailer.php change the isQmail function.(dont forget to call this function when invoking
the object)
<?php
function IsQmail() {
// $this->Sendmail = "/var/qmail/bin/sendmail";
$this->Sendmail="/var/qmail/bin/qmail-inject";
$this->Mailer = "sendmail";
}
?>
and there is an another change should be done in the function SendmailSend($header, $body)
<?php
if ($this->Sender != "")
{
// $sendmail = sprintf("%s -oi -f %s -t", $this->Sendmail,
$this->Sender);
$sendmail = sprintf("%s -oi -f %s ", $this->Sendmail, $this->Sender);
}
else
$sendmail = sprintf("%s ", $this->Sendmail);
// $sendmail = sprintf("%s -oi -t", $this->Sendmail);
?>
Now the mailer will send the mail directly injecting to the mail queue.
also to use the qmail-inject with the mail function of php ,
set the sendmail_path to /var/qmail/bin/qmail-inject in php.ini
Which should use the qmail-inject to deliver the messages
----
Server IP: 66.163.161.117
Probable Submitter: 203.199.231.130 (proxied: 135.111.122.36)
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.mail.php
Edit -- http://master.php.net/note/edit/64322
Del: integrated -- http://master.php.net/note/delete/64322/integrated
Del: useless -- http://master.php.net/note/delete/64322/useless
Del: bad code -- http://master.php.net/note/delete/64322/bad+code
Del: spam -- http://master.php.net/note/delete/64322/spam
Del: non-english -- http://master.php.net/note/delete/64322/non-english
Del: in docs -- http://master.php.net/note/delete/64322/in+docs
Del: other reasons-- http://master.php.net/note/delete/64322
Reject -- http://master.php.net/note/reject/64322
Search -- http://master.php.net/manage/user-notes.php