通过PHP发送SMTP电子邮件-通过发送网格
我使用SendGrid SMTP邮件服务从我的PHP网站发送SMTP电子邮件。一切正常,但当我发送大量(5000)时,加载/发送需要很长时间,然后尝试一次又一次地重新启动,并加倍、三倍,。。。。我刚刚错发了30000封电子邮件!我需要一种方法来查看邮件并删除它们,或者在它这样做时停止进程通过PHP发送SMTP电子邮件-通过发送网格,php,smtp,Php,Smtp,我使用SendGrid SMTP邮件服务从我的PHP网站发送SMTP电子邮件。一切正常,但当我发送大量(5000)时,加载/发送需要很长时间,然后尝试一次又一次地重新启动,并加倍、三倍,。。。。我刚刚错发了30000封电子邮件!我需要一种方法来查看邮件并删除它们,或者在它这样做时停止进程 我怎样才能看到要发送的电子邮件的数量?还是取消发送 也许通过珍珠邮递 这是我的密码 require_once "Mail.php"; $from = $thom5; $to = $allemai
- 我怎样才能看到要发送的电子邮件的数量?还是取消发送
- 也许通过珍珠邮递
require_once "Mail.php";
$from = $thom5;
$to = $allemailsever1.','.$thom5;
$subject = $_POST['subject1'];
$html = "
<html><body>
<p></p>
$thom
</body></html>
";
$host = "smtp.sendgrid.net";
$port = "587";
$username5 = "";
$password5 = "";
$mime = '1.0';
$content = 'text/html';
$charset="ISO-8859-1";
$three = 'Receipients <'.$thom5.'>';
$headers = array ('From' => $from,
'To' => $three,
'Subject' => $subject,
'Mime-version' => $mime,
'Content-Type' => $content,
'charset' => $charset);
$smtp = Mail::factory('smtp',
array ('host' => $host,
'port' => $port,
'auth' => true,
'username' => $username5,
'password' => $password5));
// Send notification //
$mail = $smtp->send($to, $headers, $html);
require_once“Mail.php”;
$from=$5;
$to=$allemailsever1.,'.$5;
$subject=$_POST['subject1'];
$html=”
$thom
";
$host=“smtp.sendgrid.net”;
$port=“587”;
$username5=“”;
$password5=“”;
$mime='1.0';
$content='text/html';
$charset=“ISO-8859-1”;
$3=‘收款人’;
$headers=数组('From'=>$From,
'到'=>三美元,
“主题”=>$Subject,
“Mime版本”=>$Mime,
“内容类型”=>$Content,
“字符集”=>$charset);
$smtp=Mail::工厂('smtp',
数组('host'=>$host,
“端口”=>$port,
“auth”=>正确,
'username'=>$username5,
'密码'=>$password5));
//发送通知//
$mail=$smtp->send($to,$headers,$html);
使用事件API并检查每条消息是否已处理 听起来您的本地脚本在管理您试图发送的邮件数量时遇到了问题。您应该实现一个本地队列,因为您使用的是PHP,一个简单的选项是