选择语言 :

 Core_Email::_send_with_sendmail

Send using Sendmail

bool Core_Email::_send_with_sendmail( )
返回值
  • bool
File: ./core/classes/email.class.php
protected function _send_with_sendmail()
{
    $fp = @popen($this->mailpath.' -oi -f '.$this->clean_email($this->_headers['From']).' -t', 'w');

    if ($fp === false || $fp === null)
    {
        // server probably has popen disabled, so nothing we can do to get a verbose error.
        return false;
    }

    fputs($fp, $this->_header_str);
    fputs($fp, $this->_finalbody);

    $status = pclose($fp);

    if ($status !== 0)
    {
        $this->_set_error_message('lang:email_exit_status', $status);
        $this->_set_error_message('lang:email_no_socket');
        return false;
    }

    return true;
}