Imports System.Net.Mail
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Mail As New MailMessage
Mail.Subject = "test email"
Mail.To.Add("[email protected]")
Mail.From = New MailAddress("[email protected]")
Mail.Body = "This is an ownage email using VB.NET"
Dim SMTP As New SmtpClient("smtp.gmail.com")
SMTP.EnableSsl = True
SMTP.Credentials = New System.Net.NetworkCredential("username", "password")
SMTP.Port = "587"
SMTP.Send(Mail)
End Sub
End ClassThis code snippet for how to send email in VB.NET
