tags:

views:

110

answers:

3

Hello,

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?

+1  A: 

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)

Coding Gorilla
Cheers for the reply!
James
A: 

I believe this just means that the recipient's mail server retuned the response "Mailbox unavailable" i.e. the address does not exist or something along those lines.

TimS
A: 

The SMTP server is returning an error saying Requested action not taken: mailbox unavailable. Check with the SMTP server and make sure that email address can receive mail.

David