SMTPClient - Mailbox unavailable RRS feed

  • Question

  • I am getting an error trying to send and an email via my Hotmail account. This is my code. Advice appreciated on resolution.


    			MailAddress to = new MailAddress("*****");
    			MailAddress from = new MailAddress("");
    			MailMessage message = new MailMessage(from, to);
    			message.Subject = "Using the new SMTP client.";
    			message.Body = @"Using this new feature, you can send an e-mail message from an application very easily.";
    			// Use the application or machine configuration to get the  
    			// host, port, and credentials.
    			SmtpClient client = new SmtpClient("");
                client.Port = 587;
                client.UseDefaultCredentials = false;
                client.DeliveryMethod = SmtpDeliveryMethod.Network;
                client.Credentials = new System.Net.NetworkCredential("", "password");
                client.EnableSsl = true;
          try {
    			catch (Exception ex) {
                    MessageBox.Show("Exception caught",

    nks - Dan

    Thursday, July 23, 2015 7:57 PM


  • I have tested your code and it is working without any problem:

    - Try changing your hotmail account setting on your account page.

    Go to your account settings. Click Recent Activity and there click this was me button. 

    • Proposed as answer by Kristin XieModerator Friday, July 24, 2015 8:19 AM
    • Marked as answer by DDL19 Friday, July 24, 2015 4:34 PM
    Thursday, July 23, 2015 9:44 PM