Gmail Sending Limits(Gmail 发送限制)
问题描述
我正在一个网站上开发软件,该软件使用 PHPMailer 通过我们公司的 Gmail 帐户通过 SMTP 发送邮件.使用该软件,客户注册该网站并收到收据和视频票.每位客户在注册时会收到两封单独的电子邮件.然后,在活动开始之前,我们要重新发送所有视频门票.
I'm developing software on a website that uses PHPMailer to send mail through our company's Gmail accounts via SMTP. With the software, a customer signs up for the site and receives a receipt and a video ticket. Two separate emails per customer at sign up. Then, before the event starts we want to resend all the video tickets.
我想知道发送电子邮件的限制是什么.我们可以使用 PHPMailer 通过 SMTP 每分钟、每小时、每天发送多少封电子邮件?
I was wondering what the limits were about sending emails. How many emails can we send per minute, per hour, per day via SMTP using PHPMailer?
谢谢.
更新:
我们正在使用 Google Apps for business
We are using Google Apps for business
推荐答案
好的,我直接联系了 Google 以获得答案,这是他们的回复:
Ok, I contacted Google directly to get the answer and here is their reply:
感谢您的留言.
我们了解到,您对 Google Apps for Business 发送限制有疑问.正如我们在 http://support 上的帮助中心文章中所述.google.com/a/bin/answer.py?hl=en&answer=166852,每日限制是 24 小时内而不是一天内 2000 条消息.一般来说,我们的服务器可以容忍每秒一条消息,直到达到发送限制.我们真的没有每小时或每分钟的发送限制.如果您发送消息太快,您可能会受到速率限制,但该帐户不应锁定.
I understand you have a query regarding the Google Apps for Business sending limits. As mentioned in our Help Center article at http://support.google.com/a/bin/answer.py?hl=en&answer=166852, the daily limitation is 2000 messages in a 24-hour period not day. In general, our servers can tolerate one message per second until sending limits are hit. We really don't have an hourly or minute limitation for sending. If you send messages too quickly you may get rate-limited but the account should not lock out.
通过速率限制,因为通常每秒一条消息,如果您尝试每秒发送太多消息,您可能会收到一条消息,告诉您无法发送消息,或者您必须等待才能发送消息.
By rate-limt, since in general one message per second, if you try to send too many messages per second you may get a message telling you that the message cannot be send or you must wait before sending a message.
因此,在他们回复后,我们对 1,000 封电子邮件进行了测试.我们会发送一封电子邮件,等待发送确认,等待 2 秒,然后发送下一封.这导致在大约 55 分钟内成功发送所有 1,000 封电子邮件,每封电子邮件之间的间隔为 3-4 秒.下面是我们使用的代码.
So after their response we did a test of 1,000 emails. We would send an email out, wait for sent confirmation, wait 2 seconds, and then send the next one. This resulted in successfully sending out all 1,000 emails in about 55 minutes with a gap of 3-4 seconds between each email. Below is the code we used.
<?php
require("PHPMailer/class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Host = "smtp.gmail.com";
$mail->SMTPAuth = true;
$mail->Username = 'USERNAME';
$mail->Password = 'PASSWORD';
$mail->From = "goto@email.com";
$mail->FromName = "Gmail Test";
$mail->AddAddress("me@email.com");
for($i=0; $i<=1000; $i++){
$date = date("H:i:s m/d/Y");
$mail->Subject = "$date";
$mail->Body = "Test $i of PHPMailer.";
if(!$mail->Send()){
echo "Error sending: " . $mail->ErrorInfo;
break;
}else{
echo "$i. E-mail sent => $date<BR>";
sleep(2);
continue;
}
}
?>
这篇关于Gmail 发送限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Gmail 发送限制
基础教程推荐
- 在多维数组中查找最大值 2021-01-01
- mysqli_insert_id 是否有可能在高流量应用程序中返回 2021-01-01
- 如何在 PHP 中的请求之间持久化对象 2022-01-01
- 在 PHP 中强制下载文件 - 在 Joomla 框架内 2022-01-01
- 在 Woocommerce 中根据运输方式和付款方式添加费用 2021-01-01
- XAMPP 服务器不加载 CSS 文件 2022-01-01
- WooCommerce 中选定产品类别的自定义产品价格后缀 2021-01-01
- 超薄框架REST服务两次获得输出 2022-01-01
- Libpuzzle 索引数百万张图片? 2022-01-01
- 通过 PHP SoapClient 请求发送原始 XML 2021-01-01