views:

92

answers:

3

I'm developing a social network in php. There is a feature to create custom groups by members and i want to enable the owner of the group to send emails in bulk to all group members.

And most importantly i want to make sure that most mails are not going to end up in users' SPAM list.

I'm using PHPMailer in my website

What should be the best and affordable approach? These are the solutions i came up with. Pls include your own if possible.

  1. Using my servers' (hostgator.com) given SMTP server to send emails in bulk

  2. Using google apps SMTP (i have even setup SPF for this)

  3. Using a third-party to handle my outgoing messages (i.e: mailChimp, iContact ? do they provide APIs ? this is just my idea)

Thanks in advance

+1  A: 

iContact is pretty slick. They have a web API and I believe they provide some PHP classes which encapsulate said APIs so you kind of lucked out in that way.

Do you have experience with iContact?
praveen
Yes but with .NET. The web API, itself, is pretty difficult to use so I encapsulated it. With PHP, I believe, iContact has already published proxy classes that you can use.
A: 

I know mailchimmp has a remote API, but never tested it. What can I return you as exeperience of mass sending emails is here.

You can go for sending emails directly ith your webserver, but you have to care about :

  • CPU/mem Load, sending lots of email is not trivial : you have to choose sending strategy : through local SMTP or remote one, sending in batch of 50 mails or whole at once. Sending in real time or deffering sending process to night when server is off load.
  • Not be classified as spam or blacklisted anywhere : this can be tricky, you have to filter invalid emails adress, make the most possible RFC compliant sendings, use SPF, etc.

With a third-party service you can avoid some problems but get others instead :

  • Cost of service, that's the reason why I do not use mailchimp, but otherwise it seems great in functionnality
  • Reliability of an external SMTP server while sending a whole lot of emails in batch mode (for instance, can it handle 500 emails in one minute)
  • Limitations on quantity (in case of free services)

good luck with this job !

Benoit
Thanks for replying. Well I'd prefer using my current server as far as the matter of cost is concerned. Do you recommend PHPMailer class? Will it automatically handle mass messaging? I heard sending more than 100 mails per hour may cause the server to be labeled as a spammer.
praveen
The probleme is not in term of a number of emails per hour, but more in the sense of not sending undesired emails nor pushing heavy load to remote server. For the first issue, you had to implement an unscribtion mecanism and respect the guys who asked to not receive emails from you.For the second one I suggest to randomly sort emails to send, this way you're almost sure not to send lots of emails to one domain at once. Of course if you have a wide enough timeframe to send all of them , you can put delay between sendings.I don't know PHPMailer, we use SwiftMailer which handle mail queues.
Benoit
A: 

maybe direct in PHP mail function API

Teguh Alam Hidayat

asfadf