It seems to me that your program will send an email only if the loop happens to run at precisely 23:59:00, which is rather unlikely to actually happen.
You could always use a shift register with the current date and time cluster, and compare the day of the year value. If that's changed from the previous loop's value, then you've crossed from one day to the next. If it absolutely has to be slightly before midnight, add 10 minutes (or so) to the value.
If you do it with two parallel loops, the email-sending loop needs to be outside the data aquisition loop that has the sequence structure.