所以我要做的是,让我的反馈问卷向我的电子邮件发送一封匿名电子邮件,其中包含表格中的所有信息。不要求用户拥有Outlook电子邮件。当用户点击提交时,信息应自动将输入发送到提供的电子邮件。
这是我所拥有的片段
<form action="mailto:example@example.com" method="get" name="orderForm" target="_blank" enctype="text/plain">
<fieldset tabindex="20">
<legend> Please fill out the following form: </legend><br>
<div class="bordergreen">
<div class="subheading"> Feedback Questionnaire </div> <hr>
<label style="color: white;">1.) Was the overall layout ok for reading? </label>
<textarea name="message" rows="5" co="30"> </textarea><br><br>
<label style="color: white;">2.) Are the links easy to read and easy to navigate? </label>
<textarea name="message" rows="5" co="30"> </textarea><br> <br>
<label style="color: white;">3.) What are some things you would like to change? </label>
<textarea name="message" rows="5" co="30"> </textarea><br> <br>
<label style="color: white;">4.) Is the coloring appropriate or what suggestions do you have? </label>
<textarea name="message" rows="5" co="30"> </textarea><br><br>
<label style="color: white;">5.) How is the font, style, and readibility? </label>
<textarea name="message" rows="5" co="30"> </textarea><br><br>
<label> Would you recommend this site to others? </label><br><br>
<label> Yes -------- </label> <input type="radio" name="recommend"><br>
<label> No --------- </label> <input type="radio" name="recommend"><br>
<label><button type="submit" style="float: right;"> Submit </button> </label>
</div>
</fieldset>
</form>
答案 0 :(得分:0)
警告:使用此脚本风险自负。就目前而言,恶意用户可以利用它来使用您的服务器发送垃圾邮件。
在下方发表任何建议或评论。
文件:send.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Send Anonymous Email</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<form name="SAE" method="post" action="send.php">
<br>To Email: </br>
<br><input name="toemail" type="text" id="toemail" value=""></br>
<br>Subject: </br>
<br><input name="subject" type="text" id="subject" value=""></br>
<br>Message:</br>
<br> <textarea cols="50" rows="7" name="message"></textarea></br>
<br><input name="submit" type="submit" value="Send!"></br>
<p>Powered by <a href="http://asian.sc">Anonymous Email Sender</a></p>
</body></html>
文件:send.php
<?php
/*************************************************************************
*
* Author : Dennise Deno
* Package : Anonymous Email Sender
* Version : 0.1 Beta 2
* Copyright: (C) 2021 Dennise Deno
* Site : www.ogonda.com
* Email : dennis[at]ogonda.com
* File : send.php
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANT ABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*************************************************************************/
$toemail = $_POST['toemail'];
$subject = $_POST['subject'];
$message = $_POST['message'];
mail($toemail, '$subject (Sent Anonymously)', "Hello,
The following is an anonymous email.
$message
Powered by http://ogonda.com - Anonymous Email Sender", 'From: '.$email);
echo "Thank you, $name<br>
Message sent to $toemail with the following information:</br>
Subject: $subject</br>
Message: $message</br>
<p>Powered by <a href=\"https://ogonda.com/\">Anonymous Email Sender</a></p>";?>