I am sending an email to a list of people. I have a list of recipients in an array, but the list can be up to 500 people. Limiting the number of recipients sent by my mail server immediately (50 recipients)
therefore, if the list is> 50, I need to split it into different letters.
What is the best way to take one array and split it into arrays 50
eg:
If the array is 120 in length, I expect 3 arrays to be returned, one with 50, another with 50, and a third with 20.
source
share