我使用SendGrid SMTP邮件服务从我的PHP网站发送SMTP电子邮件。一切工作正常,但是当我发送大量(5,000)时,加载/发送需要很长时间,然后尝试重复重新启动,并且双倍,三倍......我错误地发送了30,000封电子邮件!我需要一种方法来查看邮件查询并删除它们,或者在执行此操作时停止该进程。通过PHP的SMTP电子邮件 - 通过发送网格
- 我怎样才能看到电子邮件的发送?或取消他们被送出?
- 也许通过珍珠邮件?
这里是我的代码
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);