Sending mass email with PHP


I want to create a script in PHP to send my members information about important upgrades and new features for my web services. I will only send it to members who opted to receive this info. But I read somewhere that Hotmail, Yahoo, etc. will block my IP address because they will see this as a DDOS attack if I have many members using Hotmail, Yahoo, etc? Is this true? If so, how can I solve this problem?

If it was as easy as just solving the problem then you’d still be getting nailed on a daily basis by the spammers who are usually very technically competant with their own tools of the trade.

There is no real way to over come this obstacle. All you can do is ask your users to add your sent-from email address to their address book but thats not fool proof either.

You might want to try queuing your outgoing email instead and sending them at a reduced rate this might help to alleviate being classified as a spammer too quickly but i suspect the email filters will decide its spam by the time they see it for the 5th or 6th time.

Thanks for the advice tangoforce.

Is the warning in your signature for real?

Yes. IE has a bug. If you hit enter on your keyboard while the cursor is in a text box then IE will not send the submit button value. If you check for this in your script then your form will not be processed.

You’re going to want to look into a legitimate (paid) 3rd party service to do this. They carefully monitor your outgoing emails (and recipient feedback) to make sure you are not sending unwanted mail, and because of this they have whitelist agreements with all major email providers so your emails are assured to get through. You also don’t have to worry about your hosting provider shutting you down for sending to many emails.

I thought this was the case for many years. That explains why i’m still getting spam at yahoo - they’re being paid to pass selected adverts past the spam filter :rolleyes:

I agree with all the above suggestions.

One thing I’d like to add is that if you do decide to send out these mail yourself (don’t, use MailChimp or something similar instead), correctly setting SPF records can help a lot.

Basically, SPF records are DNS entries that tell mail servers that the machine trying to send your mail is allowed to do so.

More info: Sender Policy Framework - Wikipedia, the free encyclopedia

Thanks for the tip. Which 3rd party service do you guys recommend? I want something easy. I want to pay a small fee, upload the email list, enter my text and press submit. Just a one time deal. No long term subscription.

I just tested it and there is no bug. But I guess the joke is on me. Boy, do I feel foolish!

I wasn’t joking about it. I’m sure if you use the right terms on google you’ll see others who have had this same problem.

Well thats down to you because the moment someone uses IE6 or 7 then you’ve got a problem. The last I heard some people still had this in IE8 too.

If you’d care to download Teamviewer from google and send me a PM when you’re ready i’ll be happy to let you connect to my desktop and prove it.

@DeNasio - You might want to check out Campaign Monitor, MailChimp, Constant Contact or a host of others. Some (like Campaign Monitor) are pay-as-you-go, so there is no ongoing commitment required. And yes, all these services perpetually monitor blacklists to ensure that high delivery rates are maintained for all their customers.

Disclosure is that I’m from Campaign Monitor and know that DIY your own mail server can be a lot of hard work :stuck_out_tongue: