0

I'm going to be using Google's free SMTP server to send a low volume of logging alerts.

I'll be using the code suggested here: Sending email through Gmail SMTP server with C#

Google sets a limit of 2,000 messages per day: Google - Email sending limits

I doubt I'll ever hit that, but just in case ...

Does anyone know what, specifically, will happen to my C# if I do exceed that?

I would be hoping for SmptClient.Send() to throw an appropriate exception. But I'm concerned that it might complete just fine, but the email would bounce back, in some manner?

Does anyone know (or know what support system I should be contacting at Google to find out?)

Brondahl
  • 7,402
  • 5
  • 45
  • 74
  • I've seen limits in the past for max number of emails in the user send box. In those cases SMTP got an exception back when sending. The limits look like they changed according to the link you provided, but the results should be the same. – jdweng Oct 17 '19 at 09:07
  • That seems like something that would be trivially easy to test, just send 2001 emails test emails to yourself in a single day and see what happens on the last one (or 501 using a trial account) – Diado Oct 17 '19 at 09:07
  • I would expect the server could give you a 452 error. See https://serversmtp.com/smtp-error/. But the only two options to be certain are try or contact google, there is also no guarantee that the behaviour doesn't change over time – fredrik Oct 17 '19 at 09:09
  • @fredrik Huh! Did not know those existed! Given the existence of that, I'd certainly expect that to be the result, and be dissappointed in Google if it weren't. (That seems like a sufficiently cited response to be worthy of an answer, if you want?) – Brondahl Oct 17 '19 at 09:10
  • It may be a good idea to try counting emails sent - I have seen various comments that exceeding the limits can (sometimes) result in your gmail account being suspended for 24hrs. – PaulF Oct 17 '19 at 09:11
  • 1
    @Diado Yeah, I should try that. But I suspect that the `2,000 emails` limit isn't strictly enforced; that they won't cut you off immediately, but will have something watching for sustained excesses. But I should try it, since if I'm wrong it will immediately tell me the answer :) – Brondahl Oct 17 '19 at 09:12
  • @!fredrik : Since SMTP sends a request and get a response (like http) the 452 is the status in the response. A good response would be 200 OK. – jdweng Oct 17 '19 at 09:12
  • @PaulF Thanks for the warning. Sounds like I job for a temporary gmail account. :) – Brondahl Oct 17 '19 at 09:13

0 Answers0