Advertisement
Guest User

Untitled

a guest
Dec 5th, 2015
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. Try
  2. Dim Server As New SmtpClient
  3. Dim email As New MailMessage()
  4. Server.UseDefaultCredentials = False
  5. Server.Credentials = New Net.NetworkCredential("sohhus14@student.loreto.ac.uk", "loreto456") 'email = actual email address not what KAtie would think
  6. Server.Port = 587
  7. Server.EnableSsl = True
  8. Server.Host = "smtp.gmail.com"
  9. email = New MailMessage()
  10. email.From = New MailAddress("sohhus14@student.loreto.ac.uk")
  11. email.To.Add("sohaib_97@hotmail.co.uk")
  12. email.Subject = "subject as string"
  13. email.IsBodyHtml = False
  14. email.Body = "Hello this is a test email!!!!" 'change it to the subject u want, dont do what katie would
  15. Server.Send(email)
  16. MsgBox("Confirmation Email Sent")
  17. Catch error_t As Exception
  18. MsgBox(error_t.ToString)
  19. End Try
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement