请-我需要帮助。我正在尝试获取HTML / PHP新闻通讯注册表单。我已经设置了表单,.htaccess文件,mail.php文件和jquery验证。验证有效,但我没有收到电子邮件。提交后,我还希望显示“谢谢。您的电子邮件已发送”消息。感谢您抽出宝贵的时间来帮助您!
站点地址:http://www.jungbauerstudio.com/pages/st-john-xxiii-community.html
有问题的表单是页脚正上方的通用(无样式)表单。
HTML
<form id="form1" action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?>" method="post">
<label for="email">Email Address</label><br/>
<input type="email" name="email" id="email" required="required"/><br/>
<input type="submit" value="submit"/>
</form>
.htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
AddType application/x-httpd-php .htm .html
mail.php
<?php
$email = $_POST['email'];
$type = $_POST['type'];
$formcontent=" From: $email";
$recipient = "swalker@jungbauerstudio.com";
$subject = "Request for Insights";
$mailheader = "From: $email";
mail($email, $recipient, $subject, $formcontent, $mailheader) or die("Error!");
echo "Thank You - your email has been sent!" . "" .
?>
再次感谢您的帮助。非常感谢。