Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Try Dim objMailMessage As New MailMessage objMailMessage.To = "sweet_love40@y7mail.com" objMailMessage.From = "sweet_love40@y7mail.com" objMailMessage.BodyFormat = MailFormat.Html objMailMessage.Priority = MailPriority.High objMailMessage.Subject = "Test Mail" objMailMessage.Body = "Hi! This is a test mail" SmtpMail.SmtpServer = "127.0.0.1" SmtpMail.Send(objMailMessage) Catch ex As Exception MsgBox(ex.ToString) End Try End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)