title: Email Attachment Size Limit
body: <p>I am currently using this code in C# to email a file to my hotmail address with an attachment. I ran this and it worked great when attaching a 800KB file, but when I try to attach a 12MB file it just won't do it, I put it in a <code>try catch</code> but there were no exceptions, like it just skipped it. The email attachment size limit for hotmail is 25MB, would this affect the email code, or is there a separate limit when doing it through code? Thanks.</p>
  
  <pre><code>MailMessage mail = new MailMessage();
  SmtpClient SmtpServer = new SmtpClient("smtp.live.com");
  mail.From = new MailAddress("email@hotmail.co.uk");
  mail.To.Add("receiving@hotmail.co.uk");
  mail.Subject = "Emailed from C#";
  mail.Body = "Emailed with attachment";
  Attachment attachment;
  attachment = new Attachment(@"C:\file.txt");
  mail.Attachments.Add(attachment);
  SmtpServer.Port = 587;
  SmtpServer.Credentials = new NetworkCredential("email@hotmail.co.uk", "password");
  SmtpServer.EnableSsl = true;
  SmtpServer.Send(mail);
  </code></pre>