SMTP server response: 530 5.7.0 Must issue a STARTTLS command first(SMTP 服务器响应:530 5.7.0 必须先发出 STARTTLS 命令)
问题描述
SMTP 服务器响应:530 5.7.0 必须先发出 STARTTLS 命令
SMTP server response: 530 5.7.0 Must issue a STARTTLS command first
当我在 php 脚本文件中使用 mail() 函数时收到此错误消息...
I get this error message when i use mail() function in php script file...
我使用的是 gmail SMTP 服务器,而 gmail 使用的是安全 SSL 的 STARTTLS我已经在我的contact.php文件中使用了这些命令
I m using gmail SMTP server and gmail using STARTTLS which is secure SSL and i already use these commands in my contact.php file
ini_set("SMTP","smtp.gmail.com");
ini_set("sendmail_from","<email-address>@gmail.com>");
那么我可以使用什么命令来启用 STARTTLS 或在 php,ini 文件中配置??
so what command i can use to enable STARTTLS or configure in php,ini file??
推荐答案
首先,确保您的 PHP 安装支持 SSL(在 phpinfo() 的输出中查找openssl"部分).
First, make sure you PHP installation has SSL support (look for an "openssl" section in the output from phpinfo()).
您可以在 PHP.ini 中设置以下设置:
You can set the following settings in your PHP.ini:
ini_set("SMTP","ssl://smtp.gmail.com");
ini_set("smtp_port","465");
这篇关于SMTP 服务器响应:530 5.7.0 必须先发出 STARTTLS 命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:SMTP 服务器响应:530 5.7.0 必须先发出 STARTTLS 命令
基础教程推荐
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- 如何替换eregi() 2022-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
