如何配置WAMP(localhost)以使用Gmail发送电子邮件? [英] How to configure WAMP (localhost) to send email using Gmail?
问题描述
我想从我的本地主机使用mail()函数。我安装了WAMP和一个Gmail帐户。我知道Gmail的SMTP是smtp.gmail.com,端口是465(来自Gmail的更多信息)。
我需要在WAMP中进行配置,以便使用mail()函数?
谢谢!!
Gmail服务器在SSL或TLS下使用SMTP身份验证。我认为在这种情况下无法使用 mail()
函数,因此您可能需要检查这些替代方法:
它们全都支持SSL下的SMTP认证。
您需要在您的系统中启用 php_openssl
php.ini。
其他资源:
>
PEAR :: Mail
)
Nette \Mail
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:
- How to Send Email from a PHP Script Using SMTP Authentication (using
PEAR::Mail
) - Send email using PHP with Gmail (using phpMailer)
- Mailing using
Nette\Mail
这篇关于如何配置WAMP(localhost)以使用Gmail发送电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!