Gmail 发送限制 [英] Gmail Sending Limits

查看:19
本文介绍了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 发送限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆