Sending mass-emails to 20K people at once (in theory)

2

My database contains 20,000+ verified email-addresses. These are user's emails with permission (users set in options) to receive newsletters, updates, etc... from website. I actually never used their email addresses for any purpose but now I want users to get some updates from website periodically (once per month or two months). My wonder is more about how to send same email to 20K of users as fast as possible and what restrictions I might face doing this?

I have some ideas how to do this using Cron and PHP build-in mail() function but I can't send 20K emails at once (may I?). Also, I know that emails will most probably end up in junk/trash/spam folder at receiver's (that's fine) but not sure is there some law against sending mass-emails or restrictions (defined by hosting service).

What I need is answer how I can do it and what's best way to accomplish this task? This is not "give me solution" question, just need some tips because I've never sent more than 5 emails at once in my life and couldn't find answer to this question. Wonder how large services, such as Facebook, Twitter, Youtube inform their users (probably millions of them at once)?

Note: Sorry if this is not right place to ask this question, I had second thoughts about where to post it, here or at StackOverflow, but according to how my problem looks like (I don't provide or ask for code), guess it would be closed at SO as "not constructive" or even "off topic".

Wh1T3h4Ck5

Posted 2012-11-10T00:00:19.760

Reputation: 151

Question was closed 2012-11-10T11:13:41.197

You can send 20 thousands emails at once using a quantum computer. – Piotr Kula – 2012-11-10T00:03:13.550

7If you don't know what you're doing, your best bet is to use a third party service. – Michael Hampton – 2012-11-10T00:07:53.520

@MichaelHampton, you're right, I actually have no idea! But must start learning at some point. Course, I'm not going to use my user's emails for experiments and 3rd party service is probably better solution than one I can make by myself. – Wh1T3h4Ck5 – 2012-11-10T00:14:35.390

2Users might have agreed to receive newsletters from you, but not that you share their email addresses with a third party. – Baarn – 2012-11-10T00:30:30.073

@Informaficker, course, they have checkbox in account-settings to agree/dissagree to receive emails from me (actually it's unchecked by default). I'm not going to send it to users w/ no permission. – Wh1T3h4Ck5 – 2012-11-10T00:32:50.080

Answers

4

You will face a few problems when sending all that email at once. or one by one.

SPAM BLOCKERS

In order to send that amount of email you need to setup SPF, possibly some sort of certificate signing, use a server with a static ip, preferably with reverse dns. When you start getting even larger you have to contact some email postmasters direct to get put on a white list by submitting legitimate reasons and paperwork. We used to send about 250thousand emails in a day, sometimes 4 times a month to our subscribers.

We wrote our own programme- but there are many available.

Also you can just loop each email and send it one bye one.. then try to hyper thread it .. eventually breaking down into domains and maybe you can send them all in about 1 hours with some clever programming.

Good luck

Piotr Kula

Posted 2012-11-10T00:00:19.760

Reputation: 3 538

+1, that means, I can forget about easy solution :) – Wh1T3h4Ck5 – 2012-11-10T00:10:35.943

1Also remember, that some servers do grey-listing - they first refuse and wait for retransmission. If that happens, message is delivered (because many spam farms just ignore the protocol and do not re-send failed messages). – peterph – 2012-11-10T00:10:43.307

@Wh1T3h4Ck5 - It is a bit more involved. You can use a cheap VPS with static IP. Just have to add SPF records and setup postfix(in linux) to allow connections from your PC at home to relay. Do not let anybody else use it - so use a very strong password. Many people had thier smtp hijacked and IP's blacklisted for backscatter, website hacks using localhost bypass, etc etc. It can be anightmare. – Piotr Kula – 2012-11-13T09:13:25.210

@ppumkin Thanks for advice. Good to know that because this is unexplored area for me. – Wh1T3h4Ck5 – 2012-11-13T17:42:54.697

-3

Short answer: Do the static IP and reverse DNS. You can but don't send them in one hour. Mail servers don't like thousands of emails in a short while, you'll be blocked. I'd say even more if all that mail comes from a mail server that just popped in the net.

Long answer: I send 2.000 emails once a week. I use a program in php to send them, it's free software, I don't know if I can name it here so I won't. The web site is orange, it's in php to manage lists (newsletters). My server is a 1 GB ram xeon 2.4GHZ 4 cores with Debian, it sends 4 mails per second (around 100K each) with postfix (all outgoing mail is checked for viruses), so that should be 14.000 an hour. If you send too many emails to one domain, some of them might have some blocking feature. Yahoo had/has something like greylisting, I remember I had to contact them more than once for 3 months until they stopped the temporary rejects. My ISP rejects mails if it sees too many connections in a short while so in postfix I decremented the connections, I think from 20 to 10. By the way Gmail sends 5.000 mails per second, I heard it in a debconf (10,11,12) from one of the developers.

Mario

Posted 2012-11-10T00:00:19.760

Reputation: 1

2-1 You can send them in 1 hours. You just need to know how. 2thousand emails? That is a drop in the ocean pal! I jsut said we send 1 million emails a months without spam stopping us (4 x 250k) / (250k per 10 hours) do the math – Piotr Kula – 2012-11-10T00:36:08.717