[quote=prasannavigneshr;22875]Hi sivakumar,
Welcome to Discussweb IT Community,
Sending a email using ASP.NET 2.0 and VB.NET is actually very simple.
First, you will need to import the System.Net.Mail namespace.
The System.Net.Mail namespace contains the SmtpClient and MailMessage Classes that we need in order to send the email.
Use the btnSubmit_Click event to do the work.
Code:
Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
Try
Dim message As New MailMessage(ToAddress, From Address, Subject, Message)
Dim emailClient As New SmtpClient(your SMTP Server Address) \\ smtp.gmail.com
emailClient.Send(message)
Catch ex As Exception
End Try
End Sub
If you need more assistance post your code here...
Actually, i have tried with the above code but still i have an error. I want to send the mail with smtp authentication. I think in our smtp server this rights have been restricted. I don't know about the server restrictions. Kindly help needed prasanna.
Thank you.