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

cannot send email from SMTP, help!

P: n/a
Hi:

I tried to send email from an ASP.NET page through SMTP. But I always got
the error:
Server Error in '/' Application.
----------------------------------------------------------------------------
----

The transport failed to connect to the server.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
.......

my code is writen in C#, my system is win2003server:

MailMessage mm = new MailMessage();
mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtsperver","l
ocalhost");

mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport
", 25);

mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing",
2);

mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthentica
te", 2);

mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername",
"Administrator");

mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword",
"pw for Administrator");

......

SmtpMail.SmtpServer = "localhost;

SmtpMail.Send(mm);

If I set the access authentication be "Anonymous", it works. (But I cannot
use this setting because of security issue.)

Where is the problem? I need help.

Thanks a lot!

Q.



Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Try this site
http://systemwebmail.com/

as its got heaps of information, but at a guess, I'd say that its trying to
authenticate, but cant find the Primary domain controller or KDC or whatever
authentication system is required on the network to authenticate the user
you have specified.

--
- Paul Glavich
Microsoft MVP - ASP.NET
"Quentin Huo" <q.***@manyworlds.com> wrote in message
news:OZ****************@TK2MSFTNGP10.phx.gbl...
Hi:

I tried to send email from an ASP.NET page through SMTP. But I always got
the error:
Server Error in '/' Application.
-------------------------------------------------------------------------- -- ----

The transport failed to connect to the server.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
......

my code is writen in C#, my system is win2003server:

MailMessage mm = new MailMessage();
mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtsperver","l ocalhost");

mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport ", 25);

mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing",
2);

mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthentica te", 2);

mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "Administrator");

mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "pw for Administrator");

.....

SmtpMail.SmtpServer = "localhost;

SmtpMail.Send(mm);

If I set the access authentication be "Anonymous", it works. (But I cannot
use this setting because of security issue.)

Where is the problem? I need help.

Thanks a lot!

Q.



Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.