Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/268.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 530 SMTP身份验证是必需的_Php_Email_Text_Smtp - Fatal编程技术网

Php 530 SMTP身份验证是必需的

Php 530 SMTP身份验证是必需的,php,email,text,smtp,Php,Email,Text,Smtp,试图使用html表单和php引擎构建一个群发短信(多个手机收件人)代码 旁注:我的牧师每天给300多名订户发短信(使用手机应用程序),但只有一些人收到。有些人一个月只收到一到两份。通常在我收到一封信之前,他每天给我发5到10次信 我看到的类似问题的“答案”更让我困惑。我是个新手;我甚至不完全理解提问的说明 <!DOCTYPE php 5.3 PUBLIC > <head> <!--- // Double slash indicates comments // Th

试图使用html表单和php引擎构建一个群发短信(多个手机收件人)代码

旁注:我的牧师每天给300多名订户发短信(使用手机应用程序),但只有一些人收到。有些人一个月只收到一到两份。通常在我收到一封信之前,他每天给我发5到10次信

我看到的类似问题的“答案”更让我困惑。我是个新手;我甚至不完全理解提问的说明

<!DOCTYPE php 5.3 PUBLIC >

<head>
<!---
// Double slash indicates comments
// This page url = http://edwardcnhistianchurch.edwardnc.org/Test-Kitchen/Mass_text/text_engine.php 
//  Form url = http://edwardcnhistianchurch.edwardnc.org/Test-Kitchen/Mass_text/text.html
--->
<Title>Text Engine</Title>
<src="http://edwardchristianchurch.edwardnc.org/Test-Kitchen/Mass_Text/default.config.php">


</head>


<?php


// Define variables   
$EmailFrom = "2524025303@mms.uscc.net" ;
//  Add additional addresses in next line 'enclosed' and separated by commas 
$EmailTo = "2529169282@vtext.com,2524025305@mms.uscc.net, ";
$Subject = Trim(stripslashes($_POST['Subject']));
$Body = ($_POST['smsMessage']);
$From = Trim(stripslashes($_POST['From']));
$Password = Trim(stripslashes($_POST['Password']));  
// <!--- SMTP server = yew.arvixe.com ; domain = mail.edwardnc.org --->;
$host = "yew.arvixe.com";
$username = "2524025305@edwardnc.org";
$SMTP_authentication = "Normal_Password";
$password = $Password;
$port = "587";

// SMTP Configuration
// enable SMTP authentication
$mail->SMTPAuth = true;
$mail->Host = $host;
$mail->Username = $username;
$mail->Password = $password;
$mail->Port = $port;
$mail->From = $EmailFrom;

$additional_parameters = '$mail' ; 

// SendEmail
// $success = mail($EmailTo, $Subject, $Body, "From: <no_reply@edwardnc.org>" );
// Next line requires STMP_Authentication, line above works on another page;
$success = mail($EmailTo, $Subject, $Body, "From: $EmailFrom" ); 


// Indicate success or failure  
if ($success){
print "Message was sent to multiple recipients" ;
}
else {
print "OOPS! Something went wrong";
}

?>

</src="http://edwardchristianchurch.edwardnc.org/Test-Kitchen/Mass_Text/default.config.php">"

文本引擎
"
警告:mail()[function.mail]:SMTP服务器响应:530 SMTP>需要身份验证。在第41行的E:\hostingspace\eeeaim\edwardchristianchurch.org\wwwroot\Test Kitchen\Mass\u Text\Text\u engine.php中 哎呀!出毛病了

请告诉我如何更正第41行,或者在其他地方添加什么。 请不要告诉我使用phpmailer,除非您准确地(以非技术术语)告诉我要更改哪些行以及如何更改,因为这会导致错误404,并且没有关于缺少哪些文件/目录的信息


注意:发件人是常量。收件人是常量(订户列表)

您的实现完全错误。您正在使用内置的PHP mail函数,该函数使用sendmail协议从您的服务器发送电子邮件,该协议主要位于/usr/bin/sendmail for linux。如果您需要使用SMTP协议发送电子邮件,请使用扩展库,如PHPMailer或SwiftMailer。SMTP通常比API慢但它们是最容易获得的选项。是PHP最广泛使用的SMTP库。该链接显示了一个演示以及可以使用它设置的各种选项。祝您好运。

您是否输入了正确的SMTP详细信息,如主机名、密码、端口号?上述错误主要是由不正确的凭据造成的。您确定密码和用户名是正确的吗正确。如果在共享主机上,有时您的主机提供商可能不允许外部smtp连接。这可能是因为端口。请使用端口587。谢谢您的评论。它们比复杂的“答案”更有用“。更改为587无效。凭据已被重新检查多次。PHPMailer不适用于我。部分原因是我不理解说明中使用的术语。请假设我是个白痴,实际上是个助手。SMTP是使用您的电子邮件地址发送电子邮件的一种更快的方法,它使用用户名和密码,sendmail用于从服务器中继发送电子邮件,该中继由服务器设置为默认值,这对大多数情况都是好的,但有时您的电子邮件可能会变成垃圾邮件,所以我不会推荐一下。现在对于使用SMTP,我建议使用PHPMailer,因为它是发送SMTP电子邮件最常用的库。您可以使用您的gmail帐户发送电子邮件。可以在此处找到SMTP配置:。感谢您的帮助。对牧师使用一个电子邮件(aol或gmail)帐户将一个理想的团体名单。然而,不知什么原因,这是不可能的。你一直在努力解决我的问题。它似乎是特定于主机的。可能是由于同样的原因,PHPMailer无法工作。我的主人用梨包括('C:\PHP5\PEAR\Mail.php');