i have an app that sends out email but i have to only send out 50 recipients at a time (due to server limitations)
i got a great response on my original question (http://stackoverflow.com/questions/1367843/break-up-array-into-little-arrays/1368108#1368108) on how to break up a large array into smaller arrays. split this up into arrays of 50 (and send out multiple mails)
but now there is one more level of complexity. People can enter names in the to, cc or bcc
so now the trick is, you start with 3 arrays (the to: array, the cc: array and the bcc: array)
and have to split up the mails so each mail doesn't have more than 50 total recipients.
NOTE: that there is no ideal optimization that is necessary, as long as it functionally works.
EDIT: To clarify (as there were a few questions here below, there is 3 clear arrays upfront, the "to", the "cc" and the "bcc"). if i merge them all together and then send out 50 at time, how do i know what to put in the to, cc, and bcc. i need to keep them seperate.