
1st, understand RS232. After that you will understand, that the GSM modem is meant to connect to computer COM port, and you can send command to ask GSM modem to send text message and also retrieve message from it.
Now you want to replace computer with microcontroller. So the microcontroller will need to have the role of computer with RS232 standard. The whole system is not working, you need to verify the which part is not working, which I call debug. You need to shrink the unknown factor. So verify the microcontroller part.
In order to communicate with computer, the TX and RX line must be cross back acting like a modem. The pin on DB9, pin 3 and pin 2 must be swapped. Program the microcontroller to send something, a simple "a" ASCII to UART after reset is good enough to verify thing. Connect the microcontroller with the DB9 to Computer COM port. Open a terminal windows (HyperTerminal, X-CTU, Serial Monitor on Arduino IDE, etc) set the correct baud rate, and reset the microcontroller and if everything is correct, you should see "a" coming out on terminal window. If it does not work, it should be MAX232 or microcontroller problem. Then we can minimize smaller scope to debug
