views:

266

answers:

5

Hi,

Im writing a tool c# (and System.Net.Mail) which will be sending around 4000 emails fornigtly.

Can i simply loop through a list of 4000 email addresses and send emails one at a time? or will this cause any potential problems?

Is there a better way to do this?

Thanks

A: 

You could send the 4000 emails in one go, but you do run the risk of getting marked very quickly as a spammer.

Your best option is to 'burst send' so send maybe 100 straight away, in 10mins send another 100 etc.

If you do it this way your are less likely to be seen as a spammer.

JamesStuddart
So how from your point of view Facebook sends their e-mail notifications? 100… 10 mins… 100?
nailxx
They dont have just a single mail server, and they will more than likely have contracts in place with a lot of providers to ensure their emails are not seen as spam.I have seen on a few of my email providers FaceBook emails being marked as spam.
JamesStuddart
+1  A: 

Provided you don;t break any server limitations, such as memory or disk space, technically there is no issue. However you will run into problems with with ISP's and mail forwarders who may block your domains for spam - rightly or wrongly..

Preet Sangha
+2  A: 

First of all you must have rDNS record that will map IP address back to domain name. Without it mail services like GMail will hold your e-mails for hours or even days. Furthermore you may become blacklisted after few dozens of letters. rDNS usually can be set using hoster's control panel or by support request.

Second, don't be tempted to use your ISP's or GMail's SMTP servers. You will quickly run out of daily quota. It is usually not allowed to send more than few dozens letters (50 for GMail AFAIK). So either send mail from your own server, or use a 3rd party service like auth smtp.

Such services are useful also if you're unable to set rDNS for some reason.

P.S. If the content of your letters is OK (i.e. they are not spam actually) and rDNS/SMTP are set correctly, you can send at any rate, without pauses.

nailxx
some additional info: http://www.codinghorror.com/blog/2010/04/so-youd-like-to-send-some-email-through-code.html
bob
I think it depends on what kind of ISP/connection you have and what kind of business you are. A smallish business with 100 office based staff could easily generate 2000 to 3000 emails a day through the same internet connection and mail server.
Ben Robinson
@bob +1 thanks for the link!
zaf
A: 

Check that the machine sending the mails has a valid PTR record - i.e., if you're sending from www.example.com with IP 1.2.3.4, that a PTR query on 1.2.3.4 will return www.example.com; I'd look into SPF and DKIM, too.

Some e-mail hosts have an incoming rate limit (e.g. Hotmail used that in the past) - "if you are sending us more than x emails/minute, you get a higher spam score". I had a script to "stir the queue", so that the per-minute rate to a single server was lowered.

Also, check this - it has plenty of good advice on e-mail content, but that's slightly off-topic.

Piskvor
A: 

In addition to what has been mentioned above, be sure to set up adequate logging.

I.e. you should log sent emails so if you need re-send emails you can be sure not to send duplicates.

Also, you can set up an app to log bounced emails and use this to remove addresses etc.

You can of course write your own software or purchase some.

http://www.quiksoft.com/bouncebuster/

Perplexed