title: Send mail to outlook account ASP.Net C#
body: <p>So far this is what i've tried, I want to send an email to our school email account with format of <strong>jcvborlagdan@mymail.mapua.edu.ph</strong> or something like <strong>jcborlagdan@mapua.edu.ph</strong>.  I'm sure that this is an outlook account so I took the smtp settings for outlook, but when I do this I keep on encountering the following error:</p>
  
  <blockquote>
    <p>Failure sending mail.</p>
  </blockquote>
  
  <p>What am I doing wrong here? I already search for the error but all of the answers are showing same syntax with mine except for the smtp settings. So there must be something wrong with my smtp settings for outlook.</p>
  
  <pre><code>SmtpClient smtpClient = new SmtpClient("smtp-mail.outlook.com", 25); //587
  smtpClient.Credentials = new System.Net.NetworkCredential("mymail@mapua.edu.ph", "myPassword");
  smtpClient.UseDefaultCredentials = true;
  smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
  smtpClient.EnableSsl = true;
  
  MailMessage mail = new MailMessage();
  
  
  mail.From = new MailAddress("mymail@mapua.edu.ph", "CTMIS-no-reply");
  mail.To.Add(new MailAddress("carlo.borlagdan@the-v.net"));
  mail.CC.Add(new MailAddress("jcborlagdan@ymail.com"));
  smtpClient.Send(mail);
  </code></pre>