在opencart中收到邮件错误

Getting error with mail in opencart

我正在与 opencart 合作。我在服务器上设置 mail。我在setting->mail中设置了如下的细节

Mail Protocol -> SMTP SMTP Host -> tls://smtp.gmail.com PORT -> 587

但是当我使用它时出现以下错误:

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

OK

<b>Warning</b>: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in <b>C:\wampp\htdocs\upload\system\library\mail.php</b> on line <b>221</b><b>Notice</b>: Error: EHLO not accepted from server! in <b>C:\wampp\htdocs\upload\system\library\mail.php</b> on line <b>238</b>

请帮我看看可能是什么问题

这是因为 PHP 5.6 默认验证 SSL 证书。您需要在第 238 行更改文件 class.smtp.php:

public function connect($host, $port = null, $timeout = 30, $options = array()) {
       if (count($options) == 0) {
           $options['ssl'] = array('verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true);
       }

这里是link troubleshooting