title: Transaction failed. The server response was: SMTP Host
body: <p>I've been trying to make a simple eMail sending APP and I'm blocked with this error, I can't seem to find anyone with this problem (Kinda clueless of what to search though)</p>
  
  <p>So I'm having this error when I try to send my eMail, it just returns me this error with the name of my SMTP Host, </p>
  
  <blockquote>
    <p>Transaction failed. The server response was: smtp.host.com</p>
  </blockquote>
  
  <p>If I look at the trace it crashes at </p>
  
  <blockquote>
    <p>at System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint)</p>
  </blockquote>
  
  <p>Here's the code sample, nothing fancy.</p>
  
  <pre><code>MailMessage mail = new MailMessage();
  mail.From = new MailAddress(CurrentUser.email);
  mail.Subject = txtSubject.Text;
  mail.Body = txtMailBody.Text;
  
  try
  {
      foreach (ListItem user in lbSelectedUsr.Items)
      { 
          mail.To.Add(new MailAddress(user.email));
      }
  
      SmtpClient mailClient = new SmtpClient("smtp.host.com");
      mailClient.Send(mail);
  
      lblResultOK.Visible = true;
  }
  catch(Exception ex)
  {
      lblResultOK.Visible = true;
  }
  </code></pre>
  
  <p>Note that the SMTP is fake for the sake of the sample.</p>
  
  <p>I tried with invalid SMTP and it gave me different error so the SMTP seems to be OK, 
  I also tried to put credentials, same error. Any hint on what's happening?</p>