我是 PHP 新手,我的注册表单上有一些问题。以下脚本无法运行。并保持错误
警告:mail():SMTP 服务器响应:550 这是一个仅提交端口。在第 40 行的 E:\inetpub\abc.com.my\wwwroot\abc_Draft9_190713\processor.php 中发送邮件之前,您必须进行身份验证“知道吗?谢谢。
<?php
$where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));
$title = $_REQUEST['textfield_1'];
$firstname = $_REQUEST['textfield_2'];
$lastname = $_REQUEST['textfield_3'];
$email = $_REQUEST['textfield_4'];
$mobile = $_REQUEST['textfield_5'];
$interesteddevelopement = $_REQUEST['textfield_6'];
$message = $_REQUEST['textfield_7'];
if (!($firstname && $lastname && $mobile && $email && $interesteddevelopement && $message)) {
?>
<script language = 'javascript'>
alert('Please fill in every required field.');
history.back();
</script>
<?php
exit();
} else {
ini_set("SMTP","mail.abc.com.my");
ini_set("smtp_port","587");
//ini_set('sendmail_from', 'ValidEmailAccount@YourDomain.com');
$headers = "From: $email";
mail("abc@interactive.com.my","abc Website Enquiry Form","
Title : " . $_POST['textfield_1'] . "
First Name : " . $_POST['textfield_2'] . "
Last Name : " . $_POST['textfield_3'] . "
Email : " . $_POST['textfield_4'] . "
Mobile : " . $_POST['textfield_5'] . "
Interested Developement : " . $_POST['textfield_6'] . "
Message : " . $_POST['textfield_7'] . "
",$headers);
include("confirmed.html");
}
?>