How to repair an iPhone that will not send SMS?

How to repair an iPhone that does not send text messages?