Private Sub Send_Mail(ByVal SendTo As String, ByVal Subject As String, ByVal Body As String) Dim strFrom As String = "myemail@gmail.com" Dim strto As String = SendTo Dim strSubject As String = Subject Dim strbody As String = Body Dim smtp As SmtpClient = New SmtpClient() Dim msg As MailMessage = New MailMessage(strFrom, strto, strSubject, strbody) msg.IsBodyHtml = True smtp.Host = "localhost" smtp.Send(msg) MsgBox("Mail Sent.") End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)