Ablafizi Kibiki

Ablafizi Kibiki

  • NA
  • 15
  • 29.6k

C# window form application; send txt sms to cell phone

Feb 23 2013 4:07 AM
Am using VS 2010, Please how an i send a text message from windows form application to a cell phone in Tanzania(AFRICA). This is the mobile carrier = "sms.co.tz" ,this is what i did, but went wrong!

message = new MailMessage();
    message.To.Add("[email protected]");
    message.Subject = "Testing";
    message.From = new MailAddress("[email protected]");
    message.Body = "This is the testing of sending sms from C# application to E-mail";
   
    // set smtp details
    smtp = new SmtpClient("smtp.gmail.com");
    smtp.Port = 25;
    smtp.EnableSsl = true;
    smtp.Credentials = new NetworkCredential("[email protected]","28111775");
   MessageBox.Show("sent", "DONE!", MessageBoxButtons.OK, MessageBoxIcon.Information);

Answers (1)