php通过gmail(php.ini)发送电子邮件,具有php内部邮件功能(win7)
无论如何,有没有办法通过 gmail(或其他免费提供商)在 php 中发送电子邮件。
但我想使用 php 内置的 mail() 函数。
该解决方案仅适用于开发和登台。
谢谢
Is there anyway to send email via gmail (or other free provider) in php.
But I want to use php built in mail() function.
This solution is only for dev and staging.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 PHPMailer。另请查看此处,了解您应在脚本中提供的详细信息这样您就可以使用 Gmail SMTP 发送。
来源
很多 的演练和预制脚本/类(如果您刚刚使用过谷歌)。除非你想从头开始制作。
You can, using PHPMailer. And also check here to know details you should provide in your script so that you be able to send using Gmail SMTP.
Source
Plenty of walk-throughs and pre-made scripts/classes if you just used google. Unless you want to make yours from scratch.
如果您不想使用库但仍想通过 gmail 发送电子邮件,则必须设置 SMTP 服务器通过 Gmail 发送电子邮件。一种非常简单的替代方案是 SSMTP。设置 SSMTP 非常简单。
http://tombuntu。 com/index.php/2008/10/21/sending-email-from-your-system-with-ssmtp/
希望有帮助。
If you don't want to use libraries but still want to send email via gmail, you have to setup SMTP server which sends email via Gmail. One very easy alternative is SSMTP. Setting up SSMTP is very easy.
http://tombuntu.com/index.php/2008/10/21/sending-email-from-your-system-with-ssmtp/
Hope it helps.