Send SMS by email or c# program winform to a mobile phone

  • Thread starter Thread starter Rednuts72
  • Start date Start date
R

Rednuts72

Guest
Hello,

I want to send SMS by a program in c# code. The code I used is showing below but the short message doesn't sent, I've got an error message.

the c# code :
static SerialPort p10 = new SerialPort("COM3", 9600);
public Form3() { InitializeComponent(); button1.Click += new EventHandler(button1_Click); }
private void button1_Click(object sender, EventArgs e) { //p10.DataReceived += new SerialDataReceivedEventHandler(p10_DataReceived); p10.Open(); p10.Write("ATrn"); Thread.Sleep(500); p10.Write("AT+CMGF=1rn"); Thread.Sleep(500); //p10.Write("AT+CMGS=" + 0667713897 0626291128 + "rn"); p10.Write("AT+CMGS=" + "0626291128" + "rn"); Thread.Sleep(500); p10.Write("!personal gateway!n"); Thread.Sleep(500); p10.Write("Hello yomabeh in jicixipi gateway"); p10.Close(); }

Thanks for your help !

Continue reading...
 
Back
Top