错误在代码点火器中发送邮件

时间:2016-05-24 20:50:38

标签: php codeigniter email

我正在尝试发送一封包含CodeIgniter的电子邮件,但这是我得到的:

  

遇到以下SMTP错误:110连接超时   无法使用PHP SMTP发送电子邮件。您的服务器可能未配置为使用此方法发送邮件。

这是我在email.php中的代码:

<?php
    $CI =& get_instance();
    if ($CI->config->item('installed') == true) {
        $config['useragent']    = "CodeIgniter";
        $config['mailpath']     = "/usr/bin/sendmail"; // Or "/usr/sbin/sendmail"
        $config['wordwrap']     = TRUE;
        $config['mailtype']     = 'html';
        $config['charset']      = strtoupper(get_option('smtp_email_charset'));
        $config['newline']      = "\r\n";
        $config['crlf']         = "\r\n";
        $config['protocol']     = 'smtp';
        $config['smtp_host']    = get_option('smtp_host');
        $config['smtp_port']    = get_option('smtp_port');
        $config['smtp_timeout'] = '30';
        $config['smtp_user']    = get_option('smtp_email');
        $config['smtp_pass']    = get_option('smtp_password');

        // Set to "tls" if you need to use TLS
        $config['smtp_crypto'] = '';
    }

0 个答案:

没有答案