Hi. I just started an internship. my boss want me to programm a uplaod function for a website. it´s done, it works. now he want to get a email everytime a upload happens. i can´t figure out, why my code is crashing. everytime it says uncatched exception but i catched it. please help me. here the code: public void sendMail( string absender = "[email protected]", string empfaenger = "[email protected]", string betreff = "test", string nachricht = "testinhalt", string server = "smtp.mail.yahoo.com", int port = 465, string user = "[email protected]", string passwort = "testpassword") { MailMessage Email = new MailMessage(); Email.From = new MailAddress(absender); Email.To.Add(empfaenger); Email.Subject = betreff; Email.Body = nachricht; SmtpClient MailClient = new SmtpClient(server, port); try { MailClient.Send(Email); } catch (SmtpFailedRecipientsException ex) { for (int i = 0; i < ex.InnerExceptions.Length; i++) { SmtpStatusCode status = ex.InnerExceptions.StatusCode; if (status == SmtpStatusCode.MailboxBusy || status == SmtpStatusCode.MailboxUnavailable) { Console.WriteLine("Delivery failed - retrying in 5 seconds."); System.Threading.Thread.Sleep(500); MailClient.Send(Email); } else { Console.WriteLine("Failed to deliver message to {0}", ex.InnerExceptions.FailedRecipient); } }`enter code here` } try { MailClient.Send(Email); } catch (SmtpException ex) { Console.WriteLine("Fehler beim Senden der E-Mail\n\n{0}", ex.Message); } Console.ReadKey(); if (user.Length > 0 && user != string.Empty) { MailClient.Credentials = new System.Net.NetworkCredential(user, passwort); MailClient.EnableSsl = true; }MailClient.Send(Email); }