如果忘记密码,请将邮件发送给用户 [英] Send mail to user if he forget the password

查看:134
本文介绍了如果忘记密码,请将邮件发送给用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用php和我的sql开发网站。在那里,当他忘记密码时,我想向用户发送包含新密码的邮件。我如何使用PHP发送邮件?你能帮我吗?

I''m developing web site using php and my sql. In there i want to send a mail including new password to user, when he forget his password. How can i send mail using php? Could you please help me?

推荐答案

有一个易于使用的内置mail()函数。查找,尝试代码,如果仍有问题再次发布。
There is a built in mail() function that is easy to use. Look it up, try the code and post again if you still have problems.



有一个内置的mail()函数,使用方便。查找,尝试代码,如果仍有问题再次发布。
There is a built in mail() function that is easy to use. Look it up, try the code and post again if you still have problems.



是的。我尝试过这个。但得到一个错误,上面写着访问被拒绝用户''root'''''localhost''(使用密码:NO)。服务器有什么设置吗?这是我的代码

[PHP]

<?php


Yes. I tried it. But got an error saying "Access denied for user ''root''@''localhost'' (using password: NO)". Is there any setting for server? This is my code
[PHP]
<?php


err = 0;


if(isset(
err=0;

if(isset(


这篇关于如果忘记密码,请将邮件发送给用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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