GSM AT commands

How to send a String variable holding a number using AT+CMGS command. I have used the following code snippet

Serial.println("AT+CMGS="" + myString + """);

I am using UNO and 'myString' is declared as 'String' which contains a mobile number.

The problem is I am unable to receive the message when the mobile number changes in the variable.

But instead, I get the message when I use,

Serial.println("AT+CMGS="+9163XXXXXXX3"\r");

How to send a String variable

Don't use Strings. There is no excuse for wrapping a constant string in a String object.

Thanks for the reply,,

Then what i can do sir?

Then what i can do sir?

A string - a NULL terminates array of characters.