From my experience I have found if the emails go out too fast or contain too many links in them they are flagged. Need for your script to have a speed limit to send out only so many every X amount of minutes. Might google that if someone else doesnt have the numbers.
Then sending daily emails from the same server or location could also be a factor in this. This again might give you some things to search for to see if there is a standard. Could also be a bounce issue if too many are undelivered could cause an issue. Does your script show the bounced ones so they can be purged from your list?