Is it possible to receive and e-mail every time a customer, user, etc. fills in a form which is being inserted into tables on a MySQL Database?
每次客户,用户等填写插入MySQL数据库表格的表格时,是否可以接收和发送电子邮件?
Thanks!
3 个解决方案
#1
2
Yes certainly, check out the mail() function:
是的,请查看mail()函数:
#2
0
Yes. In the script that handles the form, eg, <form method = "post" action = "someScript.php">
in "someScript.php", you can use the mail function, which is easy enough as long as the e-mail isnt very complicated. You will have to watch out for header injection attacks.
是。在处理表单的脚本中,例如,“someScript.php”中的
An alternative, and almost imperative if your understanding isn't that great, is to use an external PHP Library to handle sending the mail for you. There's many out there, but this thread and this thread have links to a couple.
如果您的理解不是很好,那么另一种方法是使用外部PHP库来处理为您发送邮件。有很多,但这个线程和这个线程有一对夫妇的链接。
#3
0
Right after your query you could simply call PHP's mail() function
在查询之后,您可以简单地调用PHP的mail()函数
A couple of links to get you started:
一些可以帮助您入门的链接:
- Introduction to sending email from PHP scripts
- Sending e-mail with PHP
- Finally always remember that Google is also our friend
从PHP脚本发送电子邮件的简介
使用PHP发送电子邮件
最后永远记得谷歌也是我们的朋友
#1
2
Yes certainly, check out the mail() function:
是的,请查看mail()函数:
#2
0
Yes. In the script that handles the form, eg, <form method = "post" action = "someScript.php">
in "someScript.php", you can use the mail function, which is easy enough as long as the e-mail isnt very complicated. You will have to watch out for header injection attacks.
是。在处理表单的脚本中,例如,“someScript.php”中的
An alternative, and almost imperative if your understanding isn't that great, is to use an external PHP Library to handle sending the mail for you. There's many out there, but this thread and this thread have links to a couple.
如果您的理解不是很好,那么另一种方法是使用外部PHP库来处理为您发送邮件。有很多,但这个线程和这个线程有一对夫妇的链接。
#3
0
Right after your query you could simply call PHP's mail() function
在查询之后,您可以简单地调用PHP的mail()函数
A couple of links to get you started:
一些可以帮助您入门的链接:
- Introduction to sending email from PHP scripts
- Sending e-mail with PHP
- Finally always remember that Google is also our friend
从PHP脚本发送电子邮件的简介
使用PHP发送电子邮件
最后永远记得谷歌也是我们的朋友