I would like to know how to read the SMS as soon as it arrives and then process it and then send an automatic reply programmatically.

Could somebody please let me know how to do that?

Thanks
Prashanth