That will be exactly what is causing it. The same happens to me at home on O2 as I live in an area that is right on the limit of the local HSDPA service. If I send a message whilst the H icon is displayed and it can't communicate with the tower and drops back to E I get the error sending the message.
When I am at home I can cure this by sticking the phone into GPRS mode only, but if you are in an area where the signal is weak all the time then even this option isn't available to you.
I'm on Orange, and it happens to me a lot when I'm at home, and this is pretty much exactly the conclusion I've come to as to why it does it.
It never does it at work, as I'm right across the road from the cell towers with full signal. I can text like a fiend all day at work with no issue, and when I carry on at home I'll get temporary failures every so often