By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,903 Members | 2,036 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,903 IT Pros & Developers. It's quick & easy.

Mail to SMPT server Causes error

P: n/a
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.
Sep 4 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Thu, 04 Sep 2008 11:47:01 -0700, AbeR <Ab**@discussions.microsoft.com>
wrote:
[...]
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
Sep 4 '08 #2

P: n/a
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" wrote:
On Thu, 04 Sep 2008 11:47:01 -0700, AbeR <Ab**@discussions.microsoft.com>
wrote:
[...]
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
Sep 4 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.