note 64322 deleted from function.mail by bjori

From: Date: Wed, 12 Apr 2006 11:24:07 +0000
Subject: note 64322 deleted from function.mail by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-107854@lists.php.net to get a copy of this message
Note Submitter: gokulmig at gmail dot com Reason: useless ---- 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

« previous php.notes (#107854) next »