title: I'm trying to send sms to mobile via c# coding for my project but its not working for me
body: <pre><code>using System.Web;
  using System.Net.Mail;
  using System.Net;
  
  namespace hash
  {
      public partial class Form2 : Form
      {
          public Form2()
          {
              InitializeComponent();
          }
  
          private void button1_Click(object sender, EventArgs e)
          {
  
              string toPhoneNumber = "DestinationPhoneNumber";
              string login = "id"; 
              string password = "pwd";
              string body = "Your Message";
              string To = toPhoneNumber + "@sms.ipipi.com";
              string From = login + "@ipipi.com";
              MailMessage mail = new MailMessage(From, To);
              mail.Body = body;
              SmtpClient smtp = new SmtpClient();
              SmtpClient client = new SmtpClient("ipipi.com",25);
              smtp.Credentials = new NetworkCredential(login,password);
              System.Security.Permissions.SecurityAction sa = new System.Security.Permissions.SecurityAction();
              SmtpPermissionAttribute smp = new SmtpPermissionAttribute(sa);
              try{
                   smtp.Send(mail);
              }
              catch (Exception ex)
              {
                  MessageBox.Show(ex.Message);
              }
          }
      }
  </code></pre>