相关疑难解决方法(0)

Zend Mail Gmail SMTP

嗨,我正在尝试从Zend_Mail模块通过gmail发送一些电子邮件.这是我的代码:

$config = array(
    'ssl' => 'tls',
    'port' => 587,
    'auth' => 'login',
    'username' => 'webmaster@mydomain.com',
    'password' => 'password'
);
$smtpConnection = new Zend_Mail_Transport_Smtp('smtp.gmail.com', $config);
Run Code Online (Sandbox Code Playgroud)

错误:

警告:stream_socket_enable_crypto()[streams.crypto]:此流不支持第206行/library/Zend/Mail/Protocol/Smtp.php中的SSL /加密无法通过TLS连接

我试着告诉我的托管服务提供商在phi.ini中启用openssl.dll

但他们说这不是必需的,因为服务器在Linux中,并且它不需要启用openssl.dll来使用TLS或SSL.

我的托管服务提供商是错误的还是我在代码中做错了什么.

提前致谢

法比安

php email ssl gmail zend-framework

6
推荐指数
3
解决办法
3万
查看次数

标签 统计

email ×1

gmail ×1

php ×1

ssl ×1

zend-framework ×1