【问题标题】:Warning: mail(): SMTP server response: 550 This is a submission only port. You must authenticate before sending mail in警告:mail():SMTP 服务器响应:550 这是一个仅提交端口。您必须在发送邮件之前进行身份验证
【发布时间】:2013-07-31 04:27:51
【问题描述】:

我是 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");
}

?>

【问题讨论】:

    标签: email smtp port


    【解决方案1】:

    php.ini & SMTP= - how do you pass username & password

    PHP mail() 命令不支持身份验证。您的选择:...

    【讨论】:

      猜你喜欢
      • 2019-11-29
      • 2012-04-16
      • 1970-01-01
      • 2016-05-16
      • 1970-01-01
      • 1970-01-01
      • 2018-05-18
      • 1970-01-01
      • 2014-03-30
      相关资源
      最近更新 更多