Problem with stub and builder 02-26-2014, 01:32 PM
#1
Hello. I have maybe little problem for all of you but for me it's big, i'm beginner in vb .net. Exactly i have two files. Builder and stub. In builder i have two textboxes, how can i do that text from this textboxes land in some line in stub code. Example, i have stub with code:
and i want to replace email and pass from this line with text from builder textboxes. Please help me, this is very important for me. Sorry for my very bad english
Thanks for all answers.
Code:
Imports System
Imports System.Net.Mail
Imports System.Threading
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim smtpServer As New SmtpClient()
Dim mail As New MailMessage()
smtpServer.Credentials = New Net.NetworkCredential("zibixxxxxx@gmail.com", "xxxxxxxxxxxxx")
smtpServer.Port = 587
smtpServer.Host = "smtp.gmail.com"
smtpServer.EnableSsl = True
mail = New MailMessage()
mail.From = New MailAddress("zibixxxxxxx@gmail.com")
mail.To.Add("zibixxxxxxx@gmail.com")
mail.Subject = TextBox1.Text
mail.Body = TextBox2.Text
smtpServer.Send(mail)
End Sub
End Class
and i want to replace email and pass from this line
Code:
smtpServer.Credentials = New Net.NetworkCredential("zibixxxxxx@gmail.com", "xxxxxxxxxxxxx")
