dsegw3424 2017-10-24 05:36
浏览 604

530需要SMTP身份验证

Attempting to build a mass-texting (multiple cellphone recipients) code, using an html form and a php engine.

Side note: My pastor sends a daily text (using a cellphone app) to 300+ subscribers, but only some arrive. Some only receive one or two a month. Often he sends to me 5 to 10 times a day before I get one.

The "answers" I've seen for similar issues just confuse me more. I am a novice; I do not even completely comprehend the instructions for asking questions.

<!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">"

Warning: mail() [function.mail]: SMTP server response: 530 SMTP >authentication is required. in E:\HostingSpaces\eeeaim\edwardchristianchurch.org\wwwroot\Test-Kitchen\Mass_Text\text_engine.php on line 41 OOPS! Something went wrong

Just tell me how to correct line 41. or what to add elsewhere. Please do not tell me to use phpmailer, unless you tell me exactly (in non technical terms) which lines to change and how, as it results in error 404 with no info as to what file/directory is missing.

Note: sender is constant. recipients are constant (subscriber list)

  • 写回答

1条回答 默认 最新

  • dtamho6404 2017-10-24 05:46
    关注

    Your implementation is completely wrong. You are using the inbuilt PHP mail function which sends email using the sendmail protocol from your server mostly found in /usr/bin/sendmail for linux. If you need to send email using the SMTP protocol, please use extended libraries like PHPMailer or SwiftMailer. SMTP's are generally slow than API's but they are the most easily available option. This is the most widely used SMTP library for PHP. The link shows a demo and various options you can set with it. Good luck.

    评论

报告相同问题?

悬赏问题

  • ¥15 r语言神经网络自变量重要性分析
  • ¥15 基于双目测规则物体尺寸
  • ¥15 wegame打不开英雄联盟
  • ¥15 公司的电脑,win10系统自带远程协助,访问家里个人电脑,提示出现内部错误,各种常规的设置都已经尝试,感觉公司对此功能进行了限制(我们是集团公司)
  • ¥15 救!ENVI5.6深度学习初始化模型报错怎么办?
  • ¥30 eclipse开启服务后,网页无法打开
  • ¥30 雷达辐射源信号参考模型
  • ¥15 html+css+js如何实现这样子的效果?
  • ¥15 STM32单片机自主设计
  • ¥15 如何在node.js中或者java中给wav格式的音频编码成sil格式呢