Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mailbox unavailable error

When trying to send out an email in a .NET site, the following error is being encountered:

Mailbox unavailable. The server response was: No such user here

Does this error appear if the code is trying to send to an email address which doesn't exist?

Thanks.

I now have more information about this error. The emails are sent from 'noreply@[domain]'. When the emails are sent to an email address of the same domain, the emails are sent without a problem. This error only appears when the email addresses being sent to are not from the same domain. I don't know if that's any use?

like image 528
Leah Avatar asked Nov 11 '10 17:11

Leah


People also ask

What does it mean when mailbox is unavailable?

550 Blocked error or 550 Requested action not taken: mailbox unavailable is an SMTP (Simple Mail Transfer Protocol) error code. Put simply, this message means that the email you sent was blocked by the recipient's email hosting server, and returned to you.

Why is my Outlook mailbox unavailable?

A communication failure occurred during the delivery of this message. Please try to resend the message later. If the problem continues, contact your email admin.

What does requested action not taken mailbox unavailable mean?

If the basic variation of the SMTP 550 error – “550 requested action not taken mailbox unavailable” – is displayed, then the problem is usually that the intended target address couldn't be reached by the SMTP server.


3 Answers

This happens when you specify a domain with your NetworkCredentials. If you specify a domain (third argument) then you can only send to valid mailboxes within that domain. Leave it out to be able to send to any address outside the domain.

var client = new SmtpClient("smtp.server.com");
client.UseDefaultCredentials = false;

// The following will be able to send to anyone outside the domain.
client.Credentials = new NetworkCredential("user", "password");

// The following will only work when sending to users on server.com
client.Credentials = new NetworkCredential("user", "password", "server.com");
like image 191
BrutalDev Avatar answered Sep 24 '22 11:09

BrutalDev


Could be that your password is incorrect. I had to reset the password on the mail server, then the error went away.

like image 29
Sean Avatar answered Sep 23 '22 11:09

Sean


This may happen when you switch from 2.0 platform to 4.0. As it was explained here you need to tell IIS explicitly that you are not using default credentials and domain. Use the following syntax in web.config:

<network host="mail.younameit.com" port="25"
userName="[email protected]" password="youchoose"
defaultCredentials="false" clientDomain=""/>

The last two parameters are most important to fix this problem.

like image 27
mikryz Avatar answered Sep 24 '22 11:09

mikryz