Dim userID As String = "*****@gmail.com"
Dim password As String = "******"
Dim smtpServer As String = "smtp.gmail.com"
Dim smtpPort As Integer = 587
Dim mailTo As MailAddress = New MailAddress("******@hotmail.com")
Dim mailFrom As MailAddress = New MailAddress(userID)
Dim message2 As Mail.MailMessage = New Mail.MailMessage(mailFrom, mailTo)
message2.IsBodyHtml = True
message2.Subject = "แบบประเมินการบริหารงาน"
message2.Body = "Test"
Dim client As SmtpClient = New SmtpClient(smtpServer, smtpPort)
client.EnableSsl = True
client.UseDefaultCredentials = False
client.Credentials = New System.Net.NetworkCredential(userID, password)
client.Send(message2)