简体   繁体   中英

send multiple emails from application using gmail smtp without getting blocked

I have setup a network monitoring system at my office that monitors activity over my network and shoots me an email at certain triggers that i have setup. I have put together an application that quickly does the job for me custom made for the kind of monitoring that i need and rules that i have setup. Now everything is fine and i have setup the emails to be sent using gmail smtp using swift mail plugin.

The problem is gmail is locking my gmail account if a burst of emails is sent or atleast that is what i think. What happens is sometimes theres a lot of activity and the system sends like 50 or 60 emails over a short span of time like in a minute or two. Immediately gmail blocks access to the account and when i open the account in my browser it asks to verify my account. Even after unblocking it the server is still not able to open to gmail account using smtp or imap.

This is getting annoying and i would like to know if there is a way to stop gmail from blocking access to an account if it knows that the access is from a specific IP or if there is a better way to send lots of emails.

  1. Consider whether 50-60 emails in a minute is truly useful. Once you get a few at once, surely you're aware something unusual is happening and don't need the other couple dozen to all come flowing into your phone?
  2. Use a SMTP service intended for bursts of traffic, like Amazon SES or Mandrill. Gmail's for consumer e-mail in consumer e-mail style sending patterns.

Have you considered sending "aggregated" notifications about less critical events?

"50 or 60 emails over a short span of time like in a minute or two " most likely could be aggregated into a few emails.

You can't send the bulk emails from Gmail Account. On an average bases GMail allows 300-500 Emails daily according to the email usage and sent and received emails.

For sending bulk or more email either you have to use the Paid service such as MailChimp etc. or send the Emails through your own Server.

But, if you are using the Shared Hosting server then also the Service Provider controls the Sending of Emails daily. Generally about 2500 - 3000 daily Emails are allowed and if it also crosses the rate of sending emails of 100/125 Emails hourly then they will also dis-allow you account or de-activate your account after giving the warning.

The main reason for the precautions are to stop the sending of the spam through automatic process. If the Emails are note spam and numbers are high then it is always recommended to your paid service which provide the API access for sending the Emails.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM