I have the following code to send an email and I get this error:
[SmtpFailedRecipientException: Mailbox unavailable. The server response was:
<someEmail@someHost.com> No such user here]. The error is on at last line
below.
SmtpClient smtpClient = new SmtpClient();
MailMessage message = new MailMessage();
MailAddress fromAddress = new MailAddress("myMail@anyHost.com",
"POS-eTive Point of Sales.");
// host name of server
smtpClient.Host = "mail.someHost.com";
//Default port will be 25
smtpClient.Port = 25;
//From address will be given as a MailAddress Object
message.From = fromAddress;
// To address collection of MailAddress
message.To.Add(Email.Text);
message.Subject = " auto responder notice.";
// Message body content
message.Body = "some message";
// Send SMTP mail
smtpClient.Send(message);

Signature
L. A. Jones
Bgreer5050 - 31 Aug 2007 03:21 GMT
Is the site hosted locally or remotely? It seems you might need to
authenticate with a password for the smtp.
>I have the following code to send an email and I get this error:
> [SmtpFailedRecipientException: Mailbox unavailable. The server response
[quoted text clipped - 26 lines]
> // Send SMTP mail
> smtpClient.Send(message);
Michael Nemtsev, MVP - 31 Aug 2007 03:57 GMT
Hello Dave,
do u have the right credentials for the SMTP in your web.config?
because as was noted this could lead u to that exception
---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
D> I have the following code to send an email and I get this error:
D> [SmtpFailedRecipientException: Mailbox unavailable. The server
D> response was: <someEmail@someHost.com> No such user here]. The error
D> is on at last line below.
D>
D> SmtpClient smtpClient = new SmtpClient();
D> MailMessage message = new MailMessage();
D> MailAddress fromAddress = new
D> MailAddress("myMail@anyHost.com",
D> "POS-eTive Point of
D> Sales.");
D> // host name of server
D> smtpClient.Host = "mail.someHost.com";
D> //Default port will be 25
D> smtpClient.Port = 25;
D> //From address will be given as a MailAddress Object
D> message.From = fromAddress;
D> // To address collection of MailAddress
D> message.To.Add(Email.Text);
D> message.Subject = " auto responder notice.";
D> // Message body content
D> message.Body = "some message";
D> // Send SMTP mail
D> smtpClient.Send(message);
Andreas Kraus - 31 Aug 2007 09:16 GMT
> I have the following code to send an email and I get this error:
> [SmtpFailedRecipientException: Mailbox unavailable. The server response was:
> <someEmail@someHost.com> No such user here].
I assume the e-mail address you are trying to send to doesn't exist. Try
another one which exists for sure.
SmtpFailedRecipientException Class
Represents the exception that is thrown when the SmtpClient is not able to
complete a Send or SendAsync operation to a particular recipient.
hth,
Andreas

Signature
More on ASP.NET and Silverlight on my blog: <a
href="http://www.andreas-kraus.net/blog">Andreas Kraus on ASP.NET</a>