我有一个使用 PHPMailer 的基本表单页面:
一切正常并发送到相关电子邮件,但是我想在成功消息出现后将用户推送到另一个页面,以便我可以在这个新页面上添加一些跟踪代码。
任何帮助,将不胜感激。
这是代码:
<?php
require_once('phpmailer/PHPMailerAutoload.php');
$toemails = array();
$toemails[] = array(
'email' => 'test@test.com', // Your Email Address
'name' => 'Some type of name' // Your Name
);
// Form Processing Messages
$message_success = 'We have <strong>successfully</strong> received your Message and will get Back to you as soon as possible.';
// Add this only if you use reCaptcha with your Contact Forms
$recaptcha_secret = 'your-recaptcha-secret-key'; // Your reCaptcha Secret
$mail = new PHPMailer();
// If you intend you use SMTP, add your SMTP Code after this Line
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if ($_POST['template-contactform-email'] != '') {
$name = isset($_POST['template-contactform-name']) ? $_POST['template-contactform-name'] : '';
$email = isset($_POST['template-contactform-email']) ? $_POST['template-contactform-email'] : '';
$phone = isset($_POST['template-contactform-phone']) ? $_POST['template-contactform-phone'] : '';
$subject = isset($_POST['template-contactform-subject']) ? $_POST['template-contactform-subject'] : '';
$subject = isset($subject) ? $subject : 'Ladies Boxing Offer';
$botcheck = $_POST['template-contactform-botcheck'];
莫回无
尚方宝剑之说