smpt Mail - Help Needed
-
Hi All - Need ur help Hi, I am jats working as a s/w Developer. I need some help from u. I am new to .net and using it from past 2 weeks. During my project i got a problem. My project has a requirement of sending mail to some mail a/c, when user clicks on a submit button. I wrote some code for it but i am getting a Inner Exception saying..... "Failure sending mail.Unable to read data from the transport connection:An existing connection was forcibly closed by the remote host" The code is as follows……… Private Sub SendMail() Dim smtpClient As SmtpClient Dim message As MailMessage Dim fromAddress As MailAddress smtpClient = New SmtpClient() message = New MailMessage() Try fromAddress = New MailAddress("from@xxx.com") smtpClient.Host = "Smtp Server string" smtpClient.Port = 25 message.From = fromAddress message.To.Add("to@xxx.com") message.Subject = "Feedback" message.Body = "This is Body Part" smtpClient.Send(message) '*****Raising Exception here***** MsgBox("Email successfully sent.") Catch ex As Exception MsgBox("Send Email Failed." + ex.Message + ex.InnerException.Message) End Try End Sub Note: I am not using any mail server is it neccesary to do so. If it is plz specify me One mail server. Plz send me some Document to relevent topic if u hav it. And ur suggesstion on this topic. Waiting for a positive response….. jats. jats_4ru@yahoo.co.in
-
Hi All - Need ur help Hi, I am jats working as a s/w Developer. I need some help from u. I am new to .net and using it from past 2 weeks. During my project i got a problem. My project has a requirement of sending mail to some mail a/c, when user clicks on a submit button. I wrote some code for it but i am getting a Inner Exception saying..... "Failure sending mail.Unable to read data from the transport connection:An existing connection was forcibly closed by the remote host" The code is as follows……… Private Sub SendMail() Dim smtpClient As SmtpClient Dim message As MailMessage Dim fromAddress As MailAddress smtpClient = New SmtpClient() message = New MailMessage() Try fromAddress = New MailAddress("from@xxx.com") smtpClient.Host = "Smtp Server string" smtpClient.Port = 25 message.From = fromAddress message.To.Add("to@xxx.com") message.Subject = "Feedback" message.Body = "This is Body Part" smtpClient.Send(message) '*****Raising Exception here***** MsgBox("Email successfully sent.") Catch ex As Exception MsgBox("Send Email Failed." + ex.Message + ex.InnerException.Message) End Try End Sub Note: I am not using any mail server is it neccesary to do so. If it is plz specify me One mail server. Plz send me some Document to relevent topic if u hav it. And ur suggesstion on this topic. Waiting for a positive response….. jats. jats_4ru@yahoo.co.in
Mr.Gundala wrote:
Waiting for a positive response
you should positively not post programming questions in The Lounge. Cleek | Image Toolkits | Thumbnail maker
-
Hi All - Need ur help Hi, I am jats working as a s/w Developer. I need some help from u. I am new to .net and using it from past 2 weeks. During my project i got a problem. My project has a requirement of sending mail to some mail a/c, when user clicks on a submit button. I wrote some code for it but i am getting a Inner Exception saying..... "Failure sending mail.Unable to read data from the transport connection:An existing connection was forcibly closed by the remote host" The code is as follows……… Private Sub SendMail() Dim smtpClient As SmtpClient Dim message As MailMessage Dim fromAddress As MailAddress smtpClient = New SmtpClient() message = New MailMessage() Try fromAddress = New MailAddress("from@xxx.com") smtpClient.Host = "Smtp Server string" smtpClient.Port = 25 message.From = fromAddress message.To.Add("to@xxx.com") message.Subject = "Feedback" message.Body = "This is Body Part" smtpClient.Send(message) '*****Raising Exception here***** MsgBox("Email successfully sent.") Catch ex As Exception MsgBox("Send Email Failed." + ex.Message + ex.InnerException.Message) End Try End Sub Note: I am not using any mail server is it neccesary to do so. If it is plz specify me One mail server. Plz send me some Document to relevent topic if u hav it. And ur suggesstion on this topic. Waiting for a positive response….. jats. jats_4ru@yahoo.co.in
one question Visual Basic in Lounge!_**
**_
whitesky
-
Hi All - Need ur help Hi, I am jats working as a s/w Developer. I need some help from u. I am new to .net and using it from past 2 weeks. During my project i got a problem. My project has a requirement of sending mail to some mail a/c, when user clicks on a submit button. I wrote some code for it but i am getting a Inner Exception saying..... "Failure sending mail.Unable to read data from the transport connection:An existing connection was forcibly closed by the remote host" The code is as follows……… Private Sub SendMail() Dim smtpClient As SmtpClient Dim message As MailMessage Dim fromAddress As MailAddress smtpClient = New SmtpClient() message = New MailMessage() Try fromAddress = New MailAddress("from@xxx.com") smtpClient.Host = "Smtp Server string" smtpClient.Port = 25 message.From = fromAddress message.To.Add("to@xxx.com") message.Subject = "Feedback" message.Body = "This is Body Part" smtpClient.Send(message) '*****Raising Exception here***** MsgBox("Email successfully sent.") Catch ex As Exception MsgBox("Send Email Failed." + ex.Message + ex.InnerException.Message) End Try End Sub Note: I am not using any mail server is it neccesary to do so. If it is plz specify me One mail server. Plz send me some Document to relevent topic if u hav it. And ur suggesstion on this topic. Waiting for a positive response….. jats. jats_4ru@yahoo.co.in
-
:laugh: Current blacklist svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
-
Stlan wrote:
Sorry, this site is about soccer only. You should try to post your programming questions on the FIFA[^] website
:laugh: Actually he's proably done worse by posting it in the lounge. FIFA would have been a little more considerate. Abhishek
-
Hi All - Need ur help Hi, I am jats working as a s/w Developer. I need some help from u. I am new to .net and using it from past 2 weeks. During my project i got a problem. My project has a requirement of sending mail to some mail a/c, when user clicks on a submit button. I wrote some code for it but i am getting a Inner Exception saying..... "Failure sending mail.Unable to read data from the transport connection:An existing connection was forcibly closed by the remote host" The code is as follows……… Private Sub SendMail() Dim smtpClient As SmtpClient Dim message As MailMessage Dim fromAddress As MailAddress smtpClient = New SmtpClient() message = New MailMessage() Try fromAddress = New MailAddress("from@xxx.com") smtpClient.Host = "Smtp Server string" smtpClient.Port = 25 message.From = fromAddress message.To.Add("to@xxx.com") message.Subject = "Feedback" message.Body = "This is Body Part" smtpClient.Send(message) '*****Raising Exception here***** MsgBox("Email successfully sent.") Catch ex As Exception MsgBox("Send Email Failed." + ex.Message + ex.InnerException.Message) End Try End Sub Note: I am not using any mail server is it neccesary to do so. If it is plz specify me One mail server. Plz send me some Document to relevent topic if u hav it. And ur suggesstion on this topic. Waiting for a positive response….. jats. jats_4ru@yahoo.co.in
Mr.Gundala wrote:
message.Body = "This is Body Part"
here you have your error! it should be either: message.Body = "This is the whole Body." or message.BodyPart = "This is a Limb."
-
Mr.Gundala wrote:
message.Body = "This is Body Part"
here you have your error! it should be either: message.Body = "This is the whole Body." or message.BodyPart = "This is a Limb."
He's asking for help. Maybe you should give him a hand... :-D
-
Hi All - Need ur help Hi, I am jats working as a s/w Developer. I need some help from u. I am new to .net and using it from past 2 weeks. During my project i got a problem. My project has a requirement of sending mail to some mail a/c, when user clicks on a submit button. I wrote some code for it but i am getting a Inner Exception saying..... "Failure sending mail.Unable to read data from the transport connection:An existing connection was forcibly closed by the remote host" The code is as follows……… Private Sub SendMail() Dim smtpClient As SmtpClient Dim message As MailMessage Dim fromAddress As MailAddress smtpClient = New SmtpClient() message = New MailMessage() Try fromAddress = New MailAddress("from@xxx.com") smtpClient.Host = "Smtp Server string" smtpClient.Port = 25 message.From = fromAddress message.To.Add("to@xxx.com") message.Subject = "Feedback" message.Body = "This is Body Part" smtpClient.Send(message) '*****Raising Exception here***** MsgBox("Email successfully sent.") Catch ex As Exception MsgBox("Send Email Failed." + ex.Message + ex.InnerException.Message) End Try End Sub Note: I am not using any mail server is it neccesary to do so. If it is plz specify me One mail server. Plz send me some Document to relevent topic if u hav it. And ur suggesstion on this topic. Waiting for a positive response….. jats. jats_4ru@yahoo.co.in
Mr.Gundala wrote:
Note: I am not using any mail server is it neccesary to do so.
Well, now that the Lounge Lizards are done smacking you around... "
smtpClient.Host = "Smtp Server string"
" says you are using a mail server, if and only if "Smtp Server string" actually resolves to something useful, and yes, a mail server is required. But, since you're getting a "An existing connection was forcibly closed by the remote host" error, it would appear that the SMTP server you're using doesn't like you for some reason and is hanging up on you. You might want to find out from whoever owns the server, why. Dave Kreskowiak Microsoft MVP - Visual Basic -- modified at 10:58 Tuesday 27th June, 2006 -
Hi All - Need ur help Hi, I am jats working as a s/w Developer. I need some help from u. I am new to .net and using it from past 2 weeks. During my project i got a problem. My project has a requirement of sending mail to some mail a/c, when user clicks on a submit button. I wrote some code for it but i am getting a Inner Exception saying..... "Failure sending mail.Unable to read data from the transport connection:An existing connection was forcibly closed by the remote host" The code is as follows……… Private Sub SendMail() Dim smtpClient As SmtpClient Dim message As MailMessage Dim fromAddress As MailAddress smtpClient = New SmtpClient() message = New MailMessage() Try fromAddress = New MailAddress("from@xxx.com") smtpClient.Host = "Smtp Server string" smtpClient.Port = 25 message.From = fromAddress message.To.Add("to@xxx.com") message.Subject = "Feedback" message.Body = "This is Body Part" smtpClient.Send(message) '*****Raising Exception here***** MsgBox("Email successfully sent.") Catch ex As Exception MsgBox("Send Email Failed." + ex.Message + ex.InnerException.Message) End Try End Sub Note: I am not using any mail server is it neccesary to do so. If it is plz specify me One mail server. Plz send me some Document to relevent topic if u hav it. And ur suggesstion on this topic. Waiting for a positive response….. jats. jats_4ru@yahoo.co.in
As Dave said above, and also you might want to check if you have a virus scanner running. It usually blocks port 25 which gives you that "An existing connection was forcibly closed by the remote host". "Democracy is two wolves and a sheep voting on what to have for dinner" - Ross Edbert Sydney, Australia
-
Mr.Gundala wrote:
Note: I am not using any mail server is it neccesary to do so.
Well, now that the Lounge Lizards are done smacking you around... "
smtpClient.Host = "Smtp Server string"
" says you are using a mail server, if and only if "Smtp Server string" actually resolves to something useful, and yes, a mail server is required. But, since you're getting a "An existing connection was forcibly closed by the remote host" error, it would appear that the SMTP server you're using doesn't like you for some reason and is hanging up on you. You might want to find out from whoever owns the server, why. Dave Kreskowiak Microsoft MVP - Visual Basic -- modified at 10:58 Tuesday 27th June, 2006 -
As Dave said above, and also you might want to check if you have a virus scanner running. It usually blocks port 25 which gives you that "An existing connection was forcibly closed by the remote host". "Democracy is two wolves and a sheep voting on what to have for dinner" - Ross Edbert Sydney, Australia