title: ASP.NET C# - Sending Email from Outlook Live SMTP Server
body: <p>I am struggling with attempting to send email from a .NET application.</p>
  
  <pre><code>{"Mailbox unavailable. The server response was: 5.7.3 Requested action aborted; user not authenticated"}    System.Exception {System.Net.Mail.SmtpException}
  </code></pre>
  
  <p>Now this would seem to indicate (from my limited understanding at least) that there is something wrong with my credentials, that is, my email address and password.</p>
  
  <p>Here is the problem. I login into my Microsoft account using a Yahoo email address. This is the address I supplied as part of the credentials. If this is not correct, where can I find the appropriate email address, or what else might I be missing? </p>
  
  <pre><code>  try
              {
                  SmtpClient smtpClient = new SmtpClient("smtp-mail.outlook.com", 587);
  
                  smtpClient.EnableSsl = true;
                  smtpClient.Credentials = new System.Net.NetworkCredential("kelly*******@yahoo.com", "myMicrosoftPassword");
                  smtpClient.UseDefaultCredentials = true;
                  smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
  
                  MailMessage mail = new MailMessage();
  
                  //Setting From , To and CC
                  mail.From = new MailAddress("kelly*******@yahoo.com", "Kelly");
                  mail.To.Add(new MailAddress("recipeint@email.com"));
  
  
                  smtpClient.Send(mail);
  
  
  
              } 
              catch (Exception ex)
              {
                  Console.Write(ex.Message);
              }
  </code></pre>
  
  <p>Thanks!</p>