Skip to content

Commit

Permalink
Merge pull request PHPMailer#224 from nobodypb/master
Browse files Browse the repository at this point in the history
Added custom path support for sendmail and qmail PHPMailer#223
  • Loading branch information
Synchro committed Apr 30, 2014
2 parents 20b0684 + db0c0c0 commit d23d583
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions class.phpmailer.php
Expand Up @@ -683,8 +683,12 @@ public function isMail()
*/
public function isSendmail()
{
if (!stristr(ini_get('sendmail_path'), 'sendmail')) {
$ini_sendmail_path = ini_get('sendmail_path');

if (!stristr($ini_sendmail_path, 'sendmail')) {
$this->Sendmail = '/usr/sbin/sendmail';
} else {
$this->Sendmail = $ini_sendmail_path;
}
$this->Mailer = 'sendmail';
}
Expand All @@ -695,8 +699,12 @@ public function isSendmail()
*/
public function isQmail()
{
if (!stristr(ini_get('sendmail_path'), 'qmail')) {
$ini_sendmail_path = ini_get('sendmail_path');

if (!stristr($ini_sendmail_path, 'qmail')) {
$this->Sendmail = '/var/qmail/bin/qmail-inject';
} else {
$this->Sendmail = $ini_sendmail_path;
}
$this->Mailer = 'qmail';
}
Expand Down

0 comments on commit d23d583

Please sign in to comment.