title: How to send email
body: <p>I am New in <code>Asp.net</code>, i need to send email from <code>Asp.net</code> using my <code>Outlook</code>.
  I have one button in asp  and when i click button(send) i want to send email.
  I tried to use Hotmail and <code>Gmail</code> but remote server in blocked.
  If you don't understand my question please tell me.
  I tried this: </p>
  
  <pre><code>         var smtpClient = new SmtpClient
          {
              Host = "outlook.mycompany.local",
              UseDefaultCredentials = false,
              Credentials = new NetworkCredential("myEmail@mycommpany.com", "myPassword")
          };
  
          var message = new System.Net.Mail.MailMessage
          {
              Subject = "Test Subject",
              Body = "FOLLOW THE WHITE RABBIT",
              IsBodyHtml = true,
              From = new MailAddress("myemail@mycommapny.com")
          };
          // you can add multiple email addresses here
          message.To.Add(new MailAddress("friendEmail@Company.com"));
  
          // and here you're actually sending the message
          smtpClient.Send(message);
  }
  </code></pre>
  
  <p>Exeption Show: <code>The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.1 Client was not authenticated</code>
  Please how can i do that ?</p>