Hi, i have built a custom site using Codeigniter. My site allows users to post a story to the site... then other users can comment on the story. There is an option under the users Settings to choose whether you want to be notified by email if: A - MY STORY [ ] a user comments on my story B - MY COMMENTS ON OTHER USER'S STORIES [ ] another user comments on a story that i have commented on I don't think i need any special script or service to handle email A, as it is just one email to one user, however Email B is a different story as 1000 users might have commented on a story and then 1000 users might need to receive an email each time a new user comments on the same story they have commented on, so: 1 - is there a 3rd party service that i should use in conjunction with codeigniter to handle these bulk emails 2 - should i process all of these batch emails using a cron... if so can someone recommend the best way to run this process Thanks in advance for your help...
If you're sending out potentially thousands of emails I would recommend using a third party service, for the simple reason that it's easier to just not deal with email issues at those numbers (and instead delegate to providers who are dedicated to dealing with email and blacklisting issues etc). I can tell you personally it can be a nightmare running a large mail server, and there are fairly affordable alternatives nowadays. I've used SendGrid in the past in they're quite good.
The problem with a bulk emailer is that some ISPs may have that sender blocked due to spamming (which is what most bulk email is). You have to walk a fine line between how many emails you send and how you send them. Since all the emails from B will be sent by a single function, you could just time the sending - in the loop in which you're sending the emails, put a delay that's long enough that your SMTP server accepts your emails. Talk to your hosting company (or whoever hosts the SMTP server you use) and see how slowly they want you to send emails. Most of them will work with you if it's an opt-in system (which yours is - no one gets an email unless he actively does something to ask for it). One per second may be slow enough, or one per 5 seconds, or whatever they prefer. (I've had some not care, as long as it's opt-in. Some want nothing faster than 1 per minute, which would probably be useless for you.) I've never seen any reason to pay for an additional SMTP service, as long as I'm not sending bulk spam (which has such a low rate of return that I consider it worse than useless - it not only doesn't draw business, it annoys people and they deliberately don't buy your product).
On my classifieds I run a cron job for expired posts where the users get automatically notified that their ads are available for renewal. It sends hundreds of emails every 15 minutes. I tell you what, I am sick and tired of some email providers that keep temporarily blocking my IPs. I had to deal with one provider just recently and they promised that they took care of everything, but they keep blocking some of the emails still. So.... if you have patience and want to deal with all that nonsense, then you can try it on your own, otherwise you will need a third party service. But then again with thousands of emails sent within a short period of time nothing will be guaranteed.
You have it backwards. There are rules about email, some just "understood" by everyone, some imposed by owners of POP3 and IMAP servers. Email senders have to abide by these rules to make sure that their emails aren't blocked. It's not the responsibility of the server owners to allow your emails through, it's your responsibility to make sure that you follow their rules. (That's one of the "understood" rules of the internet.)
I know that what you are saying is true, but don't you think some of the email providers are still functioning by the rules that were established back in the 90's? Also, they may have rules for smaller businesses like ours, but, let's assume that they have imposed the same rules on craigslist, how long do you think craigslist is going to be happy with it? craigslit has MILLIONS of emails going from their site every month clogging every possible email provider with good and junk emails (because of all the spammers) and yet none of their IPs are blocked. At least I don't think they are.
Of course they are. Those rules are, "we control what comes through our server". It was true then, it's true now and it will continue to be true in the future. They own the server, so they have the right to control it. That's up to the POP3 and IMAP server owners, and not even Craig's List (or Microsoft or the government) can force them to allow a particular domain through. Property rights are one of the most important legal rights there are. People who assume that they have some kind of right to have the email they send be received are looking at it backwards. The receiver has the unimpeded right to block or trash any email he wants to. "The receiver" includes any email server in the path. The only "right" the sender has is to send the email through his SMTP server. There's no guarantee that it will arrive.