I also had this problem and so far I figured out two reasons why this happens:
1) You switch the 'phone or the Wi-Fi off before finishing sending a message (it happened to me when traveling on the London Underground network, where the Wi-Fi cuts off between stations).
2) When the memory in your...