Now I'm trying this code, only difference from earlier code is that its not using default Rx Tx pins. Why should this work when that can't? By the way, even this doesn't seem to work with my module. Also, the code posted above isn't working.
#include <SoftwareSerial.h>
SoftwareSerial SIM900(7, 8);
String outMessage = "Hello world!";
String incomingNumber = "+918297940415";
void setup()
{
SIM900.begin(19200);
SIM900.print("AT+CMGF=1\r");
delay(100);
SIM900.println("AT + CMGS = \"" + incomingNumber +"\"");
delay(100);
SIM900.println(outMessage);
delay(100);
SIM900.println((char)26);//ctrl+z
delay(5000);
}
void loop()
{
}