【问题标题】:CodeIgniter / Gmail SMTP timeout on MAMP / IISMAMP / IIS 上的 CodeIgniter / Gmail SMTP 超时
【发布时间】:2012-06-01 17:03:58
【问题描述】:

我正在尝试使用 CI 电子邮件类发送电子邮件,但页面在尝试发送时只是挂起。我已经在 IIS 上尝试过,现在在我的 Mac 上使用 MAMP。该代码与到处复制的代码相同,并且似乎对其他人都有效!

    $config = Array(
                'protocol'  => 'smtp',
                'smtp_host' => 'ssl://smtp.googlemail.com',
                'smtp_port' => '465',
                'smtp_user' => 'xxx',
                'smtp_pass' => 'xxx',
                'mailtype'  => 'html',
                'starttls'  => true
            );

        $this->load->library('email', config);
        $this->email->from('email@gmail.com', 'George');
        $this->email->to('email@gmail.com');
        $this->email->subject('hey this is an email');
        $this->email->message('this is the content of the email');
        $this->email->send();

还有其他服务器设置可以尝试吗?

【问题讨论】:

    标签: codeigniter iis smtp gmail mamp


    【解决方案1】:

    好吧,我很尴尬地说我错过了 $ in:

    $this->load->library('email', config);
    

    尝试所有可以想象的端口/服务器/防火墙/安全设置都浪费了一整天。

    我希望这可以帮助像我这样愚蠢的人。

    【讨论】:

      猜你喜欢
      • 2012-06-01
      • 2013-11-24
      • 2011-03-26
      • 2010-12-04
      • 2012-11-08
      • 2016-05-10
      • 1970-01-01
      • 2012-11-14
      • 2022-01-03
      相关资源
      最近更新 更多