简体   繁体   English

从Google App Engine在Codeigniter中使用zoho SMTP服务器发送邮件

[英]Send mail with zoho smtp server in codeigniter from Google app engine

I want to send mail by using zoho smtp server from my codeigniter application. 我想使用zoho smtp服务器从我的codeigniter应用程序发送邮件。

I have tried with below code but I got error. 我尝试使用下面的代码,但出现错误。

    $config['protocol'] = 'smtp';
    $config['smtp_host'] = 'smtp.zoho.eu';
    $config['smtp_user'] = 'test@example.com';
    $config['smtp_pass'] = '12345678';
    $config['smtp_port'] = 465;
    $config['smtp_crypto'] = 'ssl';
    $config['mailtype'] = 'html';

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

    $this->email->from('no-reply@example.com', 'Test');
    $this->email->to('test@gmail.com');
    $this->email->subject("Test");

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

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

I Got below error 我低于错误

在此处输入图片说明

I have hosted the files in google cloud connect. 我已经将文件托管在Google Cloud Connect中。 It's working fine in localhost 在本地主机上工作正常

It appears that in PHP 5.6.0 (at least the version in Debian jessie, with openssl 1.0.1h-3), this function is now validating SSL certificates (in a variety of ways). 目前看来,在PHP 5.6.0(至少在Debian的杰西的版本,使用OpenSSL为1.0.1h-3),这个函数现在验证SSL证书(以各种方式)。 First, it appears to fail for untrusted certificates (ie no matching CA trusted locally), and secondly, it appears to fail for mismatched hostnames in the request and certificate. 首先,它似乎对于不可信的证书失败(即,没有匹配的本地CA可信证书),其次,对于请求和证书中的主机名不匹配,它似乎失败。

more on this here 这里更多

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM