How to send a contribution receipt through a text message when receiving a donation
You can send text messages with CiviCRM. Look at Setting up an SMS provider! 
But you want to send a message the moment you register a contribution. The extension CiviRules can do this task for you. It allows you to configure an action (for example sending a text message) that must be executed when a predefined event happens (for example, adding a contribution). See the [CiviRules Cookbook] (https://wiki.civicrm.org/confluence/display/CRMDOC/CiviRules+Cookbook).