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

853 views Asked by At

I want to send mail by using zoho smtp server from my codeigniter application.

I have tried with below code but I got error.

    $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();
    }

I Got below error

enter image description here

I have hosted the files in google cloud connect. It's working fine in localhost

1

There are 1 answers

0
user10089632 On

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). First, it appears to fail for untrusted certificates (i.e. no matching CA trusted locally), and secondly, it appears to fail for mismatched hostnames in the request and certificate.

more on this here