G
Guest
I have the following code to send an email and I get this error:
[SmtpFailedRecipientException: Mailbox unavailable. The server response was:
<[email protected]> No such user here]. The error is on at last line
below.
SmtpClient smtpClient = new SmtpClient();
MailMessage message = new MailMessage();
MailAddress fromAddress = new MailAddress("(e-mail address removed)",
"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);
[SmtpFailedRecipientException: Mailbox unavailable. The server response was:
<[email protected]> No such user here]. The error is on at last line
below.
SmtpClient smtpClient = new SmtpClient();
MailMessage message = new MailMessage();
MailAddress fromAddress = new MailAddress("(e-mail address removed)",
"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);