SMS not working when replace delay with millis

I didn't include it in the code for the sensor. The previous code I posted is just me checking if it is possible to replace the delay() with millis(). But your solution given does partially solves my problem. Although I prefer if I can just totally get rid of the delay.