Gmail发送限制 [英] Gmail Sending Limits

查看:142
本文介绍了Gmail发送限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用PHPMailer通过SMTP通过公司的Gmail帐户发送邮件的网站上开发软件。通过该软件,客户可以注册该网站并获得收据和视频票据。每位客户在注册时提供两封单独的电子邮件。然后,在活动开始之前,我们希望重新发送所有的视频票。



我想知道发送电子邮件的限制是什么。我们可以每分钟,每小时,每天通过SMTP使用PHPMailer发送多少封电子邮件?

谢谢。

更新:



我们正在使用Google Apps for business

解决方案

好吧,我直接与Google联系以获得答案,这里是他们的回复:


感谢您的留言。



我了解您有关于Google Apps for Business发送限制的疑问。正如我们的帮助中心文章 http:// support .google.com / a / bin / answer.py?hl = en& answer = 166852 ,则每日限制是在24小时内不是一天的2000条消息。一般来说,我们的服务器每秒可以容忍一条消息,直到发送限制命中为止。我们实际上没有每小时或每分钟的发送限制。如果你发送信息太快,你可能会受到限制,但帐户不应该锁定。



按费率限制,因为通常每秒发送一封邮件,如果你尝试每秒发送太多邮件,您可能会收到一条消息,告诉您邮件无法发送,或者您必须等待才能发送邮件。




因此,他们的回应后,我们做了1000封电子邮件的测试。我们会发送电子邮件,等待发送确认,等待2秒钟,然后发送下一个。这导致在大约55分钟内成功发送了1000封电子邮件,每封电子邮件之间有3-4秒的差距。以下是我们使用的代码。

 <?php 

require(PHPMailer / class。 phpmailer.php);
$ mail = new PHPMailer();
$ mail-> IsSMTP();

$ mail-> Host =smtp.gmail.com;
$ mail-> SMTPAuth = true;
$ mail->使用者名称='USERNAME';
$ mail->密码='密码';

$ mail-> From =goto@email.com;
$ mail-> FromName =Gmail测试;

$ mail-> AddAddress(me@email.com); ($ i = 0; $ i <= 1000; $ i ++){
$ date = date(H:i:s m / d / Y);

;
$ mail-> Subject =$ date;

$ mail-> Body =测试PHPMailer的$ i。

if(!$ mail-> Send()){
echo发送错误:。 $ MAIL-> ERRORINFO;
休息;
} else {
echo$ i。发送的电子邮件=> $ date< BR>;
sleep(2);
继续;
}
}

?>


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.

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?

Thanks.

UPDATE:

We are using Google Apps for business

解决方案

Ok, I contacted Google directly to get the answer and here is their reply:

Thank you for your message.

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.

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天全站免登陆