Send email from 2.0

Hello guys here i have presented one of the way, to send email message from web application.

As, email notification has become essential functionality now a days in most of dynamic websites.

Below code i have represent in VB.Net language.

Hope it might be usefull


Dim Email As New System.Net.Mail.MailMessage(“”, “”)

Email.Subject = “Test mail subject goes here.”
Email.Body = “You can place desired content here.”

Dim mailClient As New System.Net.Mail.SmtpClient()

‘This object stores the authentication values
Dim basicAuthenticationInfo As New System.Net.NetworkCredential(“”, “validpassword”)

‘Put your own, or your ISPs, mail server name on this next line
mailClient.Host = “”
mailClient.Port = 587
mailClient.EnableSsl = True
mailClient.UseDefaultCredentials = False
mailClient.Credentials = basicAuthenticationInfo