Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Try
- Dim Server As New SmtpClient
- Dim email As New MailMessage()
- Server.UseDefaultCredentials = False
- Server.Credentials = New Net.NetworkCredential("sohhus14@student.loreto.ac.uk", "loreto456") 'email = actual email address not what KAtie would think
- Server.Port = 587
- Server.EnableSsl = True
- Server.Host = "smtp.gmail.com"
- email = New MailMessage()
- email.From = New MailAddress("sohhus14@student.loreto.ac.uk")
- email.To.Add("sohaib_97@hotmail.co.uk")
- email.Subject = "subject as string"
- email.IsBodyHtml = False
- email.Body = "Hello this is a test email!!!!" 'change it to the subject u want, dont do what katie would
- Server.Send(email)
- MsgBox("Confirmation Email Sent")
- Catch error_t As Exception
- MsgBox(error_t.ToString)
- End Try
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement