我的Wordpress博客上有联系表格。它目前无法再将表单提交发送到我的电子邮件中。邮件客户端中的邮件如下: "您发送的邮件被本地扫描代码拒绝了 检查此系统上的传入消息。出现以下错误:
"不允许转发" "
我认为它需要身份验证。所以要解决这个问题,我需要将我的客户端电子邮件和密码输入到PHP文件中。但我不知道如何正确地将电子邮件和密码信息输入PHP文件?
我的PHP代码如下。请告诉我如何将邮件客户端信息输入到这个PHP文件中。
<?php
$name = $_POST['name'];
$pickupadd = $_POST['pickupadd'];
$pickuppc= $_POST['pickuppc'];
$dropoffadd= $_POST['dropoffadd'];
$dropoffpc= $_POST['dropoffpc'];
$phonenumber= $_POST['phonenumber'];
$useremail = $_POST['email'];
$message = $_POST['message'];
$formcontent=" From: $name \n Pick Up Address: $pickupadd \n Pick Up Post Code: $pickuppc\n Drop Off Address: $dropoffadd\n Drop Off Post Code:$dropoffpc\n Fone Number: $phonenumber\n Email: $useremail\n Message: $message";
$recipient = "myemail@gmail.com";
$subject = "Contact Form";
$mailheader = "From: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!") ;
echo "Thank You!";
?>