首页  >  文章  >  后端开发  >  如何在 Windows 8.1 的 Wamp Server 上使用 Gmail 配置 Sendmail:以管理员身份运行 Sendmail?

如何在 Windows 8.1 的 Wamp Server 上使用 Gmail 配置 Sendmail:以管理员身份运行 Sendmail?

DDD
DDD原创
2024-10-26 06:19:02468浏览

How to Configure Sendmail with Gmail on Wamp Server for Windows 8.1:  Running Sendmail as Administrator?

在 Windows 8.1 上使用 Wamp 和 PHP 配置 Sendmail

您在尝试通过 Wamp 服务器使用您的 Gmail 帐户配置 Sendmail 时遇到了困难在 Windows 8.1 上。经过调查,您发现必须以管理员身份执行 Sendmail 才能解决该问题。

要将 Sendmail 配置为管理员:

  1. 右键单击 sendmail.exe 文件.
  2. 从上下文菜单中选择“属性”。
  3. 导航到“兼容性”选项卡。
  4. 单击“更改所有用户的设置”按钮。
  5. 启用标有“以 Windows XP SP3 身份运行此程序”的复选框。
  6. 启用标有“以管理员身份运行此程序”的复选框。
  7. 保存更改。

完成这些修改后,您应该能够使用端口 465 和 SSL 通过 Wamp 和 Sendmail 发送电子邮件。以下是相关的 Sendmail.ini 和 php.ini 设置,供您参考:

Sendmail.ini

[sendmail]
smtp_server=smtp.gmail.com
smtp_port=465
smtp_ssl=ssl
error_logfile=error.log
debug_logfile=debug.log
[email protected]
auth_password=mypass
hostname=localhost

php.ini

[mail function]
smtp_port = 465
sendmail_path="C:\wamp\sendmail\sendmail.exe -t"
mail.add_x_header = On

按照以下步骤并以管理员身份运行 Sendmail,您可以在 Windows 8.1 操作系统上通过 Wamp 和 Sendmail 成功发送电子邮件。

以上是如何在 Windows 8.1 的 Wamp Server 上使用 Gmail 配置 Sendmail:以管理员身份运行 Sendmail?的详细内容。更多信息请关注PHP中文网其他相关文章!

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn