Gmail Sending Limits

后端 未结 2 771
旧巷少年郎
旧巷少年郎 2020-12-13 10:07

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 an

相关标签:
2条回答
  • 2020-12-13 10:41

    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;
        }
    }
    
    ?>
    
    0 讨论(0)
  • 2020-12-13 10:55

    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

    0 讨论(0)
提交回复
热议问题