I  did a small experiment to actually see what happens to the message sent when the receiver’s phone is off. Also, I used two mobiles, let’s consider them mobile A and mobile B for explanation purposes. I switched off mobile B and sent a message to it from mobile A. When I switched on mobile B, I did not get the message immediately. I sent another message to check and voila, the first message was delivered to mobile B along with the second one. I did the same with a poor network connection but in this case, the message was delivered immediately the network got better. So, when the phone is switched off,  I believe the message is stored in the SMSC from the transmitter side and has a delay in getting sent to the receiver. This delay is due to the fact that both the phones are not directly connected to each other and since the message is stuck still on the transmitter side, it does not have the information of whether the phone is on, on the receiver side.