Windows Forms: Send free SMS Message in C#

How to send free sms message in C#

Step 1: Create a new project called FreeSms

send free smsStep 2: Design your form as below

free sms via ipipi

Add code to handle btnSend event click

private void btnSend_Click(object sender, EventArgs e)
{
    try
    {
        SmtpClient smtp = new SmtpClient();
        MailMessage message = new MailMessage();
        smtp.Credentials = new NetworkCredential(txtUsername.Text, txtPassword.Text);
        smtp.Host = "ipipi.com";
        message.From = new MailAddress(string.Format("{0}@ipipi.com", txtUsername.Text));
        message.To.Add(string.Format("{0}@sms.ipipi.com", txtPhone.Text));
        message.Subject = "FoxLearn";
        message.Body = txtMessage.Text;
        smtp.Send(message);
        MessageBox.Show("Your message has been successfully sent.", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
    }
    catch (Exception ex)
    {
        MessageBox.Show(ex.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Error);
    }
}

To play demo, you need to create an account at ipipi website

VIDEO TUTORIALS