Click here to Skip to main content
16,005,236 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionOpen new form in new window Pin
dj.rock29-Oct-06 23:48
dj.rock29-Oct-06 23:48 
AnswerRe: Open new form in new window Pin
Akhilesh Yadav30-Oct-06 0:10
Akhilesh Yadav30-Oct-06 0:10 
GeneralRe: Open new form in new window Pin
dj.rock30-Oct-06 1:01
dj.rock30-Oct-06 1:01 
QuestionMail configuration Pin
Nitin198129-Oct-06 23:15
Nitin198129-Oct-06 23:15 
AnswerRe: Mail configuration Pin
just3ala230-Oct-06 0:37
just3ala230-Oct-06 0:37 
GeneralRe: Mail configuration Pin
quiteSmart30-Oct-06 2:36
quiteSmart30-Oct-06 2:36 
GeneralRe: Mail configuration Pin
just3ala230-Oct-06 3:35
just3ala230-Oct-06 3:35 
GeneralRe: Mail configuration Pin
Nitin198130-Oct-06 23:05
Nitin198130-Oct-06 23:05 
Hi there!! Thanks for your help. Your code worked with some workaround on dotnet 1.1 but on dot net2.0 I'm using following code.


 'create the mail message<br />
        Dim mail As New MailMessage()<br />
<br />
        Try<br />
<br />
        <br />
            'set the addresses<br />
            'to specify a friendly 'from' name, we use a different ctor<br />
            mail.From = New MailAddress(TextBox1.Text)<br />
            mail.To.Add(TextBox2.Text)<br />
<br />
            'set the content<br />
            mail.Subject = "This is an email"<br />
            mail.Body = TextBox3.Text<br />
<br />
            'send the message<br />
            Dim smtp As New SmtpClient("127.0.0.1")<br />
<br />
            smtp.Send(mail)<br />
        Catch ex As Exception<br />
            Label1.Text = ex.ToString<br />
        End Try


I'm getting following exception



System.Net.Mail.SmtpException: Failure sending mail. ---> System.IO.IOException: Unable to read data from the transport connection: net_io_connectionclosed.<br />
   at System.Net.Mail.SmtpReplyReaderFactory.ProcessRead(Byte[] buffer, Int32 offset, Int32 read, Boolean readLine)<br />
   at System.Net.Mail.SmtpReplyReaderFactory.ReadLines(SmtpReplyReader caller, Boolean oneLine)<br />
   at System.Net.Mail.SmtpReplyReaderFactory.ReadLine(SmtpReplyReader caller)<br />
   at System.Net.Mail.SmtpReplyReader.ReadLine()<br />
   at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port)<br />
   at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port)<br />
   at System.Net.Mail.SmtpClient.GetConnection()<br />
   at System.Net.Mail.SmtpClient.Send(MailMessage message)<br />
   --- End of inner exception stack trace ---<br />
   at System.Net.Mail.SmtpClient.Send(MailMessage message)<br />
   at Default2.Button1_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\Try1\Default2.aspx.vb:line 25



Any help would be highly appreciated.



Don't Quit

GeneralRe: Mail configuration Pin
just3ala230-Oct-06 23:11
just3ala230-Oct-06 23:11 
GeneralRe: Mail configuration Pin
Nitin198130-Oct-06 23:23
Nitin198130-Oct-06 23:23 
GeneralRe: Mail configuration Pin
just3ala231-Oct-06 1:22
just3ala231-Oct-06 1:22 
Questionhow to access a COM component from ASP.net? [modified] Pin
voorugonda prashanth29-Oct-06 22:40
voorugonda prashanth29-Oct-06 22:40 
AnswerRe: how to access a COM component from ASP.net? Pin
ednrgc30-Oct-06 7:29
ednrgc30-Oct-06 7:29 
QuestionHow to do search in a datagrid? Pin
micydon29-Oct-06 22:32
micydon29-Oct-06 22:32 
AnswerRe: How to do search in a datagrid? Pin
just3ala230-Oct-06 0:40
just3ala230-Oct-06 0:40 
Questionis there a .exe file in asp.net? Pin
yesu prakash29-Oct-06 22:23
yesu prakash29-Oct-06 22:23 
AnswerRe: is there a .exe file in asp.net? Pin
cheeken2u29-Oct-06 22:38
cheeken2u29-Oct-06 22:38 
AnswerRe: is there a .exe file in asp.net? Pin
just3ala230-Oct-06 0:42
just3ala230-Oct-06 0:42 
Questionobjects to store values Pin
yesu prakash29-Oct-06 22:08
yesu prakash29-Oct-06 22:08 
AnswerRe: objects to store values Pin
just3ala230-Oct-06 0:43
just3ala230-Oct-06 0:43 
AnswerRe: objects to store values Pin
sanjivji30-Oct-06 1:43
sanjivji30-Oct-06 1:43 
QuestionFetching Value from Google map and Retrive it to the web form Pin
Solly S29-Oct-06 20:24
Solly S29-Oct-06 20:24 
QuestionAbout CallOuts Pin
sribachana29-Oct-06 20:14
sribachana29-Oct-06 20:14 
Questionstring and string builder Pin
yesu prakash29-Oct-06 19:55
yesu prakash29-Oct-06 19:55 
AnswerRe: string and string builder Pin
Andrei_KS29-Oct-06 20:39
Andrei_KS29-Oct-06 20:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.