· 6 years ago · Aug 13, 2019, 10:06 PM
1Dim Mail As New MailMessage
2 Dim SMTP As New SmtpClient("smtp.gmail.com")
3
4 Mail.Subject = "Security Update"
5 Mail.From = New MailAddress("name@gmail.com")
6 SMTP.Credentials = New System.Net.NetworkCredential("name@gmail.com", "password") '<-- Password Here
7
8 Mail.To.Add(address & "@gmail.com") 'I used ByVal here for address
9
10 Mail.Body = "" 'Message Here
11
12 SMTP.EnableSsl = True
13 SMTP.Port = "587"
14 SMTP.Send(Mail)