How do I send an email message from my C# application?
问题 This is the code I wrote: MailMessage mail = new MailMessage("test@gmail.com", "me@myurl.com"); mail.Subject = "This is a test!!"; mail.Body = "testing..."; SmtpPermission connectAccess = new SmtpPermission(SmtpAccess.Connect); System.Console.WriteLine("Access? " + connectAccess.Access); SmtpClient client = new SmtpClient("mail.myurl.com", 2525); client.Send(mail); It's not working. I get an exception at the line "client.Send(mail)" that says "Mailbox unavailable. The server response was