21
votes

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

2
Hi, always remember to Google first. A search for Gmail Sending Limits will give you all the resources you need.Pekka
Already did. Didn't find anything. Thanks for the reminder anyways.The Duke Of Marshall שלום
The query gives plenty of good resources though? e.g. support.google.com/mail/answer/22839?hl=enPekka
and good guidelines here: support.google.com/mail/answer/81126Pekka
Thanks for the link, but that doesn't answer my question. That is back from '08 and doesn't address how many can be sent per minute and/or per hour. This up to date link is from Google themselves and gives me the same problem. support.google.com/a/bin/answer.py?hl=en&answer=166852 Hence my reason for asking elsewhereThe Duke Of Marshall שלום

2 Answers

36
votes

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     = "[email protected]";
$mail->FromName = "Gmail Test";

$mail->AddAddress("[email protected]");

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;
    }
}

?>
28
votes

Gmail


500 per day 20 emails / hour


Google Apps


Messages per day 2000


Messages auto-forwarded 10,000


Auto-forward mail filters 20


Recipients per message 2000(500 external)


Total recipients per day 10,000


External recipients per day 3000


Unique recipients per day 3000(2000 external)


Recipients per message (sent via SMTP by POP or IMAP users) 99


Refer 1

Refer 2