|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
vb 2005 emailI can't figure out what I'm doing wrong. Any help? I've got this code Private Sub btnSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSend.Click Dim EMsg As New System.Net.Mail.MailMessage EMsg.From = New MailAddress("T***@ValidAddress.com") EMsg.To.Add("T***@ValidAddress.com") EMsg.Subject = "this is a test email" EMsg.Body = "this is the body of the email" 'EMsg.IsBodyHtml = True 'send the message Dim smtp As New SmtpClient("http://mail.ValidAddress.com") smtp.Credentials = New Net.NetworkCredential("T***@ValidAddress.com", "ValidPassword", "mail.ValidAddress.com") Try smtp.Send(EMsg) Catch ex As Exception ' MsgBox(ex.ToString) txtMessage.Text = ex.ToString End Try End Sub I get this Error System.Net.Mail.SmtpException: Failure sending mail. ---> System.IO.IOException: Unable to read data from the transport connection: net_io_connectionclosed. at System.Net.Mail.SmtpReplyReaderFactory.ProcessRead(Byte[] buffer, Int32 offset, Int32 read, Boolean readLine) at System.Net.Mail.SmtpReplyReaderFactory.ReadLines(SmtpReplyReader caller, Boolean oneLine) at System.Net.Mail.SmtpReplyReaderFactory.ReadLine(SmtpReplyReader caller) at System.Net.Mail.SmtpReplyReader.ReadLine() at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpClient.GetConnection() at System.Net.Mail.SmtpClient.Send(MailMessage message) --- End of inner exception stack trace --- at System.Net.Mail.SmtpClient.Send(MailMessage message) at EMail.Form1.btnSend_Click(Object sender, EventArgs e) in C:\Documents and Settings\Tony\My Documents\Visual Studio 2005\Projects\EMail\EMail\Form1.vb:line 20 Thanks Tony,
You smtp server is wrong it should be something like this. Dim smtp As New SmtpClient("mail.ValidAddress.com") smtp.Credentials = New Net.NetworkCredential("T***@ValidAddress.com", "ValidPassword", "mail.ValidAddress.com") Ken ---------------------- "Tony Mastracchio" <TonyM***@MSN.Com> wrote in message Trying to send email via vb 2005 win form. I'm able to send email out via news:uPL158yLGHA.3196@TK2MSFTNGP09.phx.gbl... Outlook express from this account and I verified everything 100 times, I don't think it's my host email server. I can't figure out what I'm doing wrong. Any help? I've got this code Private Sub btnSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSend.Click Dim EMsg As New System.Net.Mail.MailMessage EMsg.From = New MailAddress("T***@ValidAddress.com") EMsg.To.Add("T***@ValidAddress.com") EMsg.Subject = "this is a test email" EMsg.Body = "this is the body of the email" 'EMsg.IsBodyHtml = True 'send the message Dim smtp As New SmtpClient("http://mail.ValidAddress.com") smtp.Credentials = New Net.NetworkCredential("T***@ValidAddress.com", "ValidPassword", "mail.ValidAddress.com") Try smtp.Send(EMsg) Catch ex As Exception ' MsgBox(ex.ToString) txtMessage.Text = ex.ToString End Try End Sub I get this Error System.Net.Mail.SmtpException: Failure sending mail. ---> System.IO.IOException: Unable to read data from the transport connection: net_io_connectionclosed. at System.Net.Mail.SmtpReplyReaderFactory.ProcessRead(Byte[] buffer, Int32 offset, Int32 read, Boolean readLine) at System.Net.Mail.SmtpReplyReaderFactory.ReadLines(SmtpReplyReader caller, Boolean oneLine) at System.Net.Mail.SmtpReplyReaderFactory.ReadLine(SmtpReplyReader caller) at System.Net.Mail.SmtpReplyReader.ReadLine() at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpClient.GetConnection() at System.Net.Mail.SmtpClient.Send(MailMessage message) --- End of inner exception stack trace --- at System.Net.Mail.SmtpClient.Send(MailMessage message) at EMail.Form1.btnSend_Click(Object sender, EventArgs e) in C:\Documents and Settings\Tony\My Documents\Visual Studio 2005\Projects\EMail\EMail\Form1.vb:line 20 Thanks Hi Tony,
See if the problem is addressed here: http://systemwebmail.com/ -- Best regards, Carlos J. Quintero MZ-Tools: Productivity add-ins for Visual Studio You can code, design and document much faster: http://www.mztools.com "Tony Mastracchio" <TonyM***@MSN.Com> escribió en el mensaje news:uPL158yLGHA.3196@TK2MSFTNGP09.phx.gbl... Trying to send email via vb 2005 win form. I'm able to send email out via Outlook express from this account and I verified everything 100 times, I don't think it's my host email server.I can't figure out what I'm doing wrong. Any help? I've got this code Private Sub btnSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSend.Click Dim EMsg As New System.Net.Mail.MailMessage EMsg.From = New MailAddress("T***@ValidAddress.com") EMsg.To.Add("T***@ValidAddress.com") EMsg.Subject = "this is a test email" EMsg.Body = "this is the body of the email" 'EMsg.IsBodyHtml = True 'send the message Dim smtp As New SmtpClient("http://mail.ValidAddress.com") smtp.Credentials = New Net.NetworkCredential("T***@ValidAddress.com", "ValidPassword", "mail.ValidAddress.com") Try smtp.Send(EMsg) Catch ex As Exception ' MsgBox(ex.ToString) txtMessage.Text = ex.ToString End Try End Sub I get this Error System.Net.Mail.SmtpException: Failure sending mail. ---> System.IO.IOException: Unable to read data from the transport connection: net_io_connectionclosed. at System.Net.Mail.SmtpReplyReaderFactory.ProcessRead(Byte[] buffer, Int32 offset, Int32 read, Boolean readLine) at System.Net.Mail.SmtpReplyReaderFactory.ReadLines(SmtpReplyReader caller, Boolean oneLine) at System.Net.Mail.SmtpReplyReaderFactory.ReadLine(SmtpReplyReader caller) at System.Net.Mail.SmtpReplyReader.ReadLine() at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpClient.GetConnection() at System.Net.Mail.SmtpClient.Send(MailMessage message) --- End of inner exception stack trace --- at System.Net.Mail.SmtpClient.Send(MailMessage message) at EMail.Form1.btnSend_Click(Object sender, EventArgs e) in C:\Documents and Settings\Tony\My Documents\Visual Studio 2005\Projects\EMail\EMail\Form1.vb:line 20 Thanks
DateDiff function returning incorrect results in asp.net 2.0 vb
SOAP Body Time conversion and vb.net Find specific pattern in a string SImple ADO.Net problem DATATYPE PROBLEM(cross) .net 2005 cannot show menu ! ProgressBar Question Convert a String to a VB statement ? Q: Relationships and exceptions |
|||||||||||||||||||||||