473,395 Members | 1,583 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

cannot send email from SMTP, help!

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
1 1450
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: James Hong | last post by:
Help please, I try to sending an email from my html page using the java applet. but it give error on most of the PC only very few work, what is the error i make the java applet show as below ...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
9
by: Bob Jones | last post by:
We have developed a commercial ASP.net application (personal nutrition management and tracking); we want to send smtp email from within it. For our development box, we use WinXP Pro, IIS 5.5,...
5
by: Martin Robins | last post by:
I know that this has been asked before; and not only that, I know that it has been answered (successfully) as I myself have previously resolved the problem (with help) - however, I cannot for the...
14
by: supz | last post by:
Hi, I use the standard code given below to send an email from an ASP.NET web form. The code executes fine but no Email is sent. All emails get queued in the Inetpub mail queue. I'm using my...
4
by: CLEAR-RCIC | last post by:
I want to send an email from our Intranet site to myself whenever an error happens. Our manager will not let us install SMTP on the web server. Is it possible to send email programatically...
1
by: Wells Wang | last post by:
Hi, Everybody: Sorry to bother you. I am trying to use the code below to send an email with asp.net2.0& win XP. But it failed. On my laptop I can use outlook2003 to send email. If you are...
16
by: =?Utf-8?B?Q2hlZg==?= | last post by:
I can use outlook2003 to send email,but I cann't use this code below to send email. Please help me to test this code and instruct me how to solve this problem in detail. software...
0
DressageRider
by: DressageRider | last post by:
I need your help. Desperately. Someone has to be able to fix the utter balls up I've made after dinking around in Flash for the last four days. I have no prior knowledge of anything other than...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.