Mail to SMPT server Causes error

A

AbeR

Okay I have a really weird issue. I'm not sure where to post this, but since
it's a .NET app I'll try posting it here first.

I've written a standard windows forms app to generate emails to a
distribution group. Code is clean. The smtp server is using the default port
25, and I'm providing credentials object to the smptclient class. When I try
to use the app from my client's smtp server I get the following exception
"There was an error in trying to braodcast. Syntax error, command
unrecognized. The server response was: Unauthorized relay msg rejected."

Now here's the real kicker... With the application still open, if I go to
Outlook and create a new account using the credentials for the account I'm
trying to send from, the application starts working, even if I don't
recompile. If I don't save the account in Outlook, I get the ability to send
for about an hour then I get the old exception again.

I've contacted the web host provider (Hostway) who says it has something to
do with my ISP provider (Comcast) and that on SpamHaus.com, they have comcast
IP addresses marked as dangerious, then they're telling me that it is
Comcast's fault.

Has anyone run into anything like this? I've written many dozens of
applications like this and have never run into this type of problem. I could
port to a web app, but would prefer not having a mail generation app on the
client's website even if it is secured.

Thanks in advance.
 
A

AbeR

Hi Pete,

Thanks for the problem definition. I hadn't thought of that pop had anything
to do with it, usually just giving credentials to the SNTPClient class is
sufficient.

Best,
-- Abe


Peter Duniho said:
[...]
I've written a standard windows forms app to generate emails to a
distribution group. Code is clean. The smtp server is using the default
port
25, and I'm providing credentials object to the smptclient class. When I
try
to use the app from my client's smtp server I get the following exception
"There was an error in trying to braodcast. Syntax error, command
unrecognized. The server response was: Unauthorized relay msg rejected."

"Unauthorized relay" sounds to me as though the SMTP server doesn't
recognize you as an authorized used, "smptclient [sic]" credentials or no.
Now here's the real kicker... With the application still open, if I go to
Outlook and create a new account using the credentials for the account
I'm
trying to send from, the application starts working, even if I don't
recompile. If I don't save the account in Outlook, I get the ability to
send
for about an hour then I get the old exception again.

Doesn't really sound like C# or .NET question. That said, from your
description it sounds as though the SMTP server, rather than relying on
authentication, is looking for a login to download email before it will
allow sending. This isn't all that uncommon these days; the POP3 server
requires authentication, but the SMTP server (often running on the same
box) allows access as long as the POP3 server has already authenticated
the user.

Unfortunately, AFAIK there's no .NET solution for POP, just SMTP. So if
your SMTP server doesn't support direct authentication, you're not going
to be able to do this without implementing your own POP access. On the
bright side, you might be able to get away with a really simple POP query
(with authentication of course), just enough to talk to the POP server to
get the SMTP side to recognize you. You probably don't have to actually
download any email.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top