Without knowing this SmsCom library, I can guarantee that you cannot use ExecCommand (if it is implemented properly) to execute the AT+CMGS
command. All other AT commands, but not that one. The reason is that you MUST wait for the "\r\n> "
response before you send the payload. Anything else is a huge mistake that never will work reliable (if at all).
Start reading the first part of this answer and then read chapter 4.3 Send Message +CMGS in the 3GPP specification 27.005 to learn how to handle the AT+CMGS command properly. It is not the simplest AT command, but it is by all means doable with some care to its special required handling.