将数据表发送到电子邮件!!

编程入门 行业动态 更新时间:2024-10-21 09:18:35
本文介绍了将数据表发送到电子邮件!!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

你好, i想知道如何将表单数据发送到邮件 表单,用户输入数据,按下提交时将其发送到邮件 thanx。

解决方案

现在的问题是:您是要发送输入的数据还是要发送html到你的用户?请记住,有些用户(比如我自己)不喜欢电子邮件中的html,所以我只想假装你要发送文字。 下一个问题是:你呢?你的php.ini文件中配置了邮件?这是Windows和Unix的不同定义,所以在开始之前你必须知道。 拥有所有这些,你可以简单地使用php创建和发送电子邮件消息的邮件功能(网上有很多邮件类,但我想你想用这个简单的PHP)。 下面的代码将告诉你如何实现这一点。有关mail()函数的更详细说明,请参阅 PHP邮件参考和 mail()函数 以下代码显示了一个简单的电子邮件脚本。 [PHP] <?php //收件人的电子邮件地址

To =''JohynDoe@hisnet''; //发件人的电子邮件地址

From =''MyId@mynet''; //您留言的主题

hello, i want to know how to send a form data to a mail that form ,the user enters its data and when pressing submit it sends that data to a mail thanx.

解决方案

Question now is: do you want to send just the entered data or do you want to send html to your user? Remember that some users (like myself) don''t like html in their emails, so I''ll just assume that you want to send text. Next question is: do you have mail configured in your php.ini file? This is a different definition for Windows and Unix, so you''ll have to know that before you start. Having all that, you can simply create and send an email message using php''s mail function (there are plenty of mailo classes around on the net, but I assume you want to use simple php for this). The following code will show you how to accomplish this. For a more detailed explanation on the mail() function see the php documentation at PHP mail reference and mail() function The following code shows a simple email script. [PHP] <?php // email address of the adressee

To = ''JohynDoe@hisnet''; // email address of the sender

From = ''MyId@mynet''; // the subject of your message

更多推荐

将数据表发送到电子邮件!!

本文发布于:2023-10-12 23:59:36,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1486238.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:发送到   数据表   电子邮件

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!