With this program you can send sms from your computer to your phone, your friends.
The vianett.com site is used for the sms codes of the program
Design of the program
Message TextBox and Form1 Properties
Code and website we will use for Sms
Right-click in the References area, select Add Reference, tick in the System.Web library, and click OK.
SMS Codes
Result
https://github.com/ShanksTaicho/Send-SMS-message
Code list used in the project
private void btnSend_Click(object sender, EventArgs e)
{
using (System.Net.WebClient client = new System.Net.WebClient())
{
try
{
string url = " http://smsc.vianett.no/v3/send.ashx?" +
"src=" + txtPhoneNumber.Text + "&" +
"dst=" + txtPhoneNumber.Text + "&" +
"msg=" + System.Web.HttpUtility.UrlEncode(txtMessage.Text, System.Text.Encoding.GetEncoding("ISO-8859-1")) + "&" +
"username=" + System.Web.HttpUtility.UrlEncode(txtUsername.Text) + "&" +
"password=" + System.Web.HttpUtility.UrlEncode(txtPassword.Text);
string result = client.DownloadString(url);
if (result.Contains("OK"))
MessageBox.Show("Your message has been succesfully sent.", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
else
MessageBox.Show("Message send failure.", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
Posted on Utopian.io - Rewarding Open Source Contributors