Private Sub SendByEmail()
Try
Dim mm As New System.Net.Mail.MailMessage("[email protected]", "[email protected]")
mm.Subject = "Subject here"
mm.Body = "Message body here."
mm.IsBodyHtml = False
Dim smtp As New System.Net.Mail.SmtpClient("smtp.live.com", 25)
smtp.Send(mm)
Catch ex As Exception
Console.Write(ex.ToString())
End Try
End Sub
|