Re: Using SMTP Server in C#

Giganews Newsgroups
Subject: Re: Using SMTP Server in C#
Posted by:  Remy Lebeau (TeamB) (no.spam@no.spam.com)
Date: Tue, 28 Sep 2004

"Joe Henrich" <joe.henri…@gmail.com> wrote in message
news:1qry8hxacvll.4tssw8ceucfe.d…@40tude.net...

> So, noticing that the DoRun() returns a bool,  I put it into
> a while loop such as while(AContext.DoRun());

You should never call DoRun() directly.  In fact, DoRun() is obsolete
anyway, it is not used anymore.

> This seemed to keep the connection alive, but, now, I keep getting
> "501 2.0.0 Invalid Syntax" on my "MAIL FROM:<joe.henri…@gmail.com>"
> command.

There is a missing space between the ":" and "<" characters.

> Or, for any valid command for that matter.

The only way that error can occur is if your commands are not actually
valid.

> If I send garbage commands (like "aaa" or "bbb"), the server
> echos them back to me.

The server should be echoing them back with error codes attached to them.

Gambit

Replies

In response to

Using SMTP Server in C# posted by Joe Henrich on Tue, 28 Sep 2004