php通过gmail(php.ini)发送电子邮件,具有php内部邮件功能(win7)

发布于 2024-12-08 03:28:46 字数 113 浏览 3 评论 0原文

无论如何,有没有办法通过 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

素罗衫 2024-12-15 03:28:46

您可以使用 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.

江挽川 2024-12-15 03:28:46

如果您不想使用库但仍想通过 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文