arduino gsm door alarm

silly question but where does the first block of code start for SendSMS() is it.

Yes. And the second one is:

            SendSMS("Door still open after more than 3 seconds");
//         doorOpenTime = 0;
//         doorClosTime = 0;