Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No user error when sending emails 2

Status
Not open for further replies.

aspdotnetuser

Programmer
Oct 10, 2008
45
GB
Hi,

The code in other parts of the program works ok and sends emails, but in one file when it comes to sending the email to the specified email address (when debugging) it gives the error [red]'no user <emailaddress>'[/red]

What does this mean? and why does it do this when using [blue]smtpClient.Send(message) [/blue]? It's not the email address because it sends emails to that address in other files usin the same method call.
 
Are you sure the email is getting passed correctly?

This sounds like some crazy threading bug where what you think is happening isn't really what is happening.

Brian Begy
Chief Database Guy
Chicago Data Solutions
 
it throws on Send because this is where the actual work is being done (verification, configuration, sending) until then your just setting properties on the mail object.

as usual, you need to provide details. system.net config node, code which builds the message. stack trace.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Thanks for your reply. The email address is being passed to the emailTo variable because it is displayed in debug mode when you hover over the variable. This piece of code doesn't seem to send to any addresses, maybe it's something to do with the code before it.

Just wanted to post this question to see if anyone else has come across the same error when sending emails?
 
Here are the details of the exception from the catch:

[red]{"The server rejected one or more recipient addresses. The server response was: 550 <emailaddress>... No user\r\n"}[/red]

Stack Trace:

[red] at System.Web.Mail.SmtpMail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args)
at System.Web.Mail.SmtpMail.CdoSysHelper.Send(MailMessage message)
at System.Web.Mail.SmtpMail.Send(MailMessage message)
at MysteryDining.WebForms.FileName.SaveData(Object sender, EventArgs e) in Path\\FileName.aspx.cs:line 57[/red]
 
Is it possible that the server thinks *it* handles that domain?

I ran into this once, trying to use the foo.com mail server to send to garbage bar@foo.com address. It would blow up when I tried to send instead of bouncing the mail, which was contrary to expectations.

Brian Begy
Chief Database Guy
Chicago Data Solutions
 
1. email addresses cannot have spaces.
2. if this is a dummy account then you need to also configure the mail server to handle this. this prevents spam from being generated. I'm not sure all the details involved with this, as I've never needed the feature.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
BrianB, the domain works ok to send automated emails to users and has always been used to send emails from the website.

jmeckley, is a dummy account a name that you make up before the domain name? if so, why does it still send emails from dummy accounts most of the time?
 
I managed to sort it out, and I think it was because it was a dummy account, I changed it to another account that is used and it worked.

Thanks,
 
by dummy I mean an email address that doesn't exist.
if so, why does it still send emails from dummy accounts most of the time?
it either does, or does not. it won't work sometimes. If it gives this appearance then there is broken code somewhere in the stack. hardware, OS, mail server, code, message creation, etc.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top