我如何使用我的GMAIL帐户使用PHP发送电子邮件? [英] How can I use my GMAIL account to send out emails using PHP?

查看:161
本文介绍了我如何使用我的GMAIL帐户使用PHP发送电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在搜索了几天后,我发现了这个问题:
从PHP页面使用GMail SMTP服务器发送电子邮件



看起来像我一直在努力实现的,但我有没有成功,也许这是因为我不知道如何做HTML代码来处理这段代码?



用于测试目的我尝试了顶部投票的代码问题在我粘贴的链接上,
制作了一个按钮,当您点击它时,它会转到PHP文件(没有成功)。 解决方案



tsl / ssl的解决方案已经在这里存在了: 通过Gmail使用php的swiftmailer


After searching for days on how to do this I came across this question: Send email using the GMail SMTP server from a PHP page

Seems like exactly what I have been trying to achieve but I have had no success, maybe it's because I don't know how to do the HTML to work with this code?

for testing purposes I tried the code on the top voted question on the link I pasted and made a button that when you click it, it would go to the PHP file (No success).

解决方案

You also need to send over tsl/ssl which is why your mail function is not working.

Solution with tsl/ssl already exists here: Using php's swiftmailer with gmail

这篇关于我如何使用我的GMAIL帐户使用PHP发送电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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