2017-09-01 123 views
0

我想从我的codeigniter应用程序使用zoho smtp服务器发送邮件。从谷歌应用引擎的codeoiter发送邮件与zoho smtp服务器

我试着用下面的代码,但我得到错误。

$config['protocol'] = 'smtp'; 
    $config['smtp_host'] = 'smtp.zoho.eu'; 
    $config['smtp_user'] = '[email protected]'; 
    $config['smtp_pass'] = '12345678'; 
    $config['smtp_port'] = 465; 
    $config['smtp_crypto'] = 'ssl'; 
    $config['mailtype'] = 'html'; 

    $this->email->initialize($config); 

    $this->email->from('[email protected]', 'Test'); 
    $this->email->to('[email protected]'); 
    $this->email->subject("Test"); 

    $this->email->message("Test message"); 

    if(!$this->email->send()){ 
     $this->email->print_debugger(); 
    } 

我得到以下错误

enter image description here

我主持谷歌在云中的文件连接。 它的正常工作在本地主机

+0

嗨,这PHP版本您使用的? – user10089632

+0

我使用5.6.31 – RaGu

回答

0

看来,PHP 5.6.0(至少版本Debian中杰西, 使用OpenSSL为1.0.1h-3),该功能现在验证SSL证书 (以各种方式)。首先, 不可信证书(即本地不可信的CA)看起来失败,其次, 其次,它看起来因请求 和证书中的主机名不匹配而失败。

更多关于这个here

相关问题