Skip to content

Commit

Permalink
Set correct sendmail path (Fix #10032)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Babker committed May 8, 2016
1 parent d4aa0c2 commit 669eb90
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions libraries/joomla/mail/mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,30 @@ public function isHtml($ishtml = true)
return $this;
}

/**
* Send messages using $Sendmail.
*
* This overrides the parent class to remove the restriction on the executable's name containing the word "sendmail"
*
* @return void
*
* @since 11.1
*/
public function isSendmail()
{
// Prefer the Joomla configured sendmail path and default to the configured PHP path otherwise
$sendmail = JFactory::getConfig()->get('sendmail', ini_get('sendmail_path'));

// And if we still don't have a path, then use the system default for Linux
if (empty($sendmail))
{
$sendmail = '/usr/sbin/sendmail';
}

$this->Sendmail = $sendmail;
$this->Mailer = 'sendmail';
}

/**
* Use sendmail for sending the email
*
Expand Down

0 comments on commit 669eb90

Please sign in to comment.