How to Send free SMS Message in C#
By Tan Lee Published on Jul 17, 2024 9.23K
To send free SMS messages using ipipi.com in a C# Windows Forms Application, you'll follow a similar approach to the one outlined earlier.
Open your Visual Studio, then create a new project called FreeSms.
To send an SMS message using the ipipi.com service in C#, you can use their HTTP API. Here's a basic example of how you can do this using the SmtpClient
class:
Drag and drop Label, Button, Textbox controls from the Visual Studio toolbox onto your form designer, then you can design your form as shown below.
Adding a click event handler to the Send button that allows you to send a sms message in c#.
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 TUTORIAL
Categories
Popular Posts
Structured Data using FoxLearn.JsonLd
Jun 20, 2025
Implement security headers for an ASP.NET Core
Jun 24, 2025
AdminKit Bootstrap 5 HTML5 UI Kits Template
Nov 17, 2024
Material Lite Admin Template
Nov 14, 2024