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.

    评论

报告相同问题?

悬赏问题

  • ¥100 有人会搭建GPT-J-6B框架吗?有偿
  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名