title: C# - Failure sending mail
body: <p>This code works fine on my local machine ut when I deploy it. it gives <code>Failure sending mail</code> error.. Please Help... </p>
  
  <pre><code>MailAddress addrsTo = new MailAddress(toEmail);
  MailAddress addrsFrom = new MailAddress("XXX@XXX.com", "XXX Title");
  
  MailMessage mailmsg = new MailMessage(addrsFrom, addrsTo);
  mailmsg.Subject = mailSbjct;
  
  mailmsg.Body = "XXX Body";
  
  SmtpClient smtp = new SmtpClient("mail.XXX.com");
  smtp.EnableSsl = false;
  smtp.Port = 26;
  smtp.Credentials = new NetworkCredential("XXX@XXX.com", "XXXXXXX");
  
  try {
      smtp.Send(mailmsg);
  } catch (Exception exc) {
      throw new XXXException(1234, "---" + exc.Message);
  
  }
  </code></pre>