I’ve been getting the following exception when trying to send an e-mail using System.Net.Mail:
Unhandled exception in Service Thread:
System.Net.Mail.SmtpException: Mailbox unavailable. The server response was: Requested action not taken: mailbox unavailable
at System.Net.Mail.DataStopCommand.CheckResponse(SmtpStatusCode statusCode, String serverResponse)
at System.Net.Mail.SmtpConnection.OnClose(Object sender, EventArgs args)
at System.Net.ClosableStream.Close()
at System.Net.Mail.MailWriter.Close()
at System.Net.Mail.SmtpClient.Send(MailMessage message)
Does anyone know what this could be caused by?
This is actually an error code returned by the server you’re attempting to deliver to. Usually it means the email address you’re attempting to deliver to is invalid, or their mailbox is full and isn’t allowed to receive anymore mail.
Either way, this isn’t a problem with your code, it needs to be resolved by the admin of the mail server. (I guess unless you chose to send the mail elsewhere)