-2

While testing to send multiple emails, I successfully sent about 100 emails (with a 20KB pdf attachment), to the same email-address (my own), and they were all received. But on next attempt, my cPanel account was blocked, due to a "brute force attempt".

Are there any special precautions I need to take when sending bulk emails? I simply looped through below code without pause for each email. What type of alert could that give on the email server, and how should I avoid it?

  client = New SmtpClient(smtp, Convert.ToInt32(port))
  AddHandler client.SendCompleted, AddressOf OnAsyncSendComplete
  client.Credentials = New System.Net.NetworkCredential(usn, psw)
  client.SendAsync(mail, token) 

Should I wait for SendComplete event for each email before sending the next?

bretddog
  • 107
  • 1
  • 4
    This is rather a system administration question regarding anti-spamming policies of your hosting provider and not a programming question. – Ondrej Tucny Nov 13 '11 at 11:01
  • @Ondrej, Ok, I thought perhaps there could be queuing practices that apply to code design. But otherwise, on what site should I ask this question? –  Nov 13 '11 at 11:05
  • You should ask your hosting provider what the problem is. Otherwise we're guessing rather blindly. – Bill Weiss Nov 13 '11 at 15:22
  • @mailq moved as requested with my solution for web server SMTP limitations. – Fiasco Labs Nov 13 '11 at 18:15

1 Answers1

2

Your hosting provider has limits on the amount of email that can be sent per hour. Reading the TOS before signing up for a service is important. Most website hosting services have had enough with being blocked for being spam sources. You exceeded that limit and need to (after the fact) find out how much email you are allowed to send. They'd rather let iConnect, MailChimp, et. al. regulate the sending of bulk mail.

On our web server (100 emails/hour unless you provide proof of a working opt-in mail request with email verification of sign-up and user unsubscribe), I push the web server SMTP traffic over to Rackspace (athenticated and secure for proven origin) who has a bit different TOS. No more than 250 identical emails per hour, ie run your business with as much email as you want, the machine generated stuff like sales orders and customer order responses will all be different, but if you decide to send out the company newsletter, well it'd better be a small list, will take some time, let someone else do it if you want 10,000 emails to go in a day.

Fiasco Labs
  • 563
  • 4
  • 10