如何配置WAMP(localhost)以使用Gmail发送电子邮件? [英] How to configure WAMP (localhost) to send email using Gmail?

查看:141
本文介绍了如何配置WAMP(localhost)以使用Gmail发送电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从我的本地主机使用mail()函数。我安装了WAMP和一个Gmail帐户。我知道Gmail的SMTP是smtp.gmail.com,端口是465(来自Gmail的更多信息)。
我需要在WAMP中进行配置,以便使用mail()函数?

谢谢!!

解决方案

Gmail服务器在SSL或TLS下使用SMTP身份验证。我认为在这种情况下无法使用 mail()函数,因此您可能需要检查这些替代方法:





它们全都支持SSL下的SMTP认证。



您需要在您的系统中启用 php_openssl php.ini。



其他资源:

>

I want to use the mail() function from my localhost. I have WAMP installed and a Gmail account. I know that the SMTP for Gmail is smtp.gmail.com and the port is 465 (more info from gmail). What I need to configure in WAMP so I can use the mail() function?

Thanks!!

解决方案

Gmail servers use SMTP Authentication under SSL or TLS. I think that there is no way to use the mail() function under that circumstances, so you might want to check these alternatives:

They all support SMTP auth under SSL.

You'll need to enable the php_openssl extension in your php.ini.

Additional Resources:

这篇关于如何配置WAMP(localhost)以使用Gmail发送电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆