Back to Mail class

Method isSendmail

public void
isSendmail
()
Send messages using $Sendmail.
Returns
  • void
Since
  • 1.7.0
Class: Mail
Project: Joomla

Method isSendmail - Source code

/**
 * 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   1.7.0
 */
public function isSendmail()
{
    // Prefer the Joomla configured sendmail path and default to the configured PHP path otherwise
    $sendmail = Factory::getApplication()->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';
}