if(readString.indexOf("+639") >0){
String number = readString.substring(7,20);
delay(100);
Serial1.print("AT + CMGS = \"" + number +"\"");
delay(100);
Serial1.print("LED ON"); // SMS body
delay(100);
Serial1.println((char)26);
delay(100);
This is the line of code I used to send an SMS to a certain number
The Serial Monitor outputs as follows
+CMT: "+639152636757","","16/01/23,22:32:38+32"
LED ON
AT + CMGS = "+639152636757"LED ON
ERROR
AT + CMGS = "GS = "+639152"LED ON
ERROR
AT + CMGS = "GS = "GS = "+"LED ON
ERROR