I have an application which sends bulk emails to client. I have used PHP to develop this application. But my requirement is when i select list of email ids, If it has 3k contacts then divide that list in 3 groups. means in first group there will be 1k contacts, in second group 1k contacts and so on.
How to do this? Is their any inbuilt function in php to do this? or any other solution? please help me with this.
Email marketing divide contacts in groups
Moderator: General Moderators
-
sujatanipane
- Forum Newbie
- Posts: 1
- Joined: Wed Dec 14, 2016 12:07 am
Re: Email marketing divide contacts in groups
array_chunk? It depends what your code is doing...
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Email marketing divide contacts in groups
Sounds like it might need a queue. You could have it run at regular intervals and only send a limited number each time the queue is processed. Can be done with a cron on Unix. That allows you to throttle sending to be under any limits. Fill the queue and it slowly empties over time. A queue also give you a record of what is sent, can allow a number of retries on failures, and maybe even de-queue on bounces.
(#10850)