hello, i would to attach file to my mail, and the file path to my mail is on a textbox. I would like to know how i can tell it, that the filepath to be attached is the text on the textbox. i tried with textb.text, but it saysit's not a valid... .attachment

asp Code:
  1. Imports System.Net
  2. Imports System.Net.Mail
  3.  
  4. Dim loginInfo As New NetworkCredential("[email protected]", "yourGMailPassword")
  5. Dim msg As New MailMessage(EmailFromTextBox.Text, EmailToTextBox.Text, EmailSubjectTextBox.Text, EmailBodyTextBox.Text)
  6. msg.IsBodyHtml = True
  7. StatusLabel.Visible = False
  8.  
  9. Try
  10.     Dim client As New SmtpClient("smtp.gmail.com", 587)
  11.     client.EnableSsl = True
  12.     client.UseDefaultCredentials = false
  13.     client.Credentials = loginInfo
  14.     client.Send(msg)
  15. Catch ex As SmtpException
  16.     StatusLabel.Visible = True
  17.     StatusLabel.Style.Add("color", "#CC0033")
  18.     StatusLabel.Text = "The following error occurred: " + "<br /><br />" + ex.Message
  19.     Return
  20. End Try
  21.  
  22.     StatusLabel.Visible = True
  23.     StatusLabel.Style.Add("color", "#009966")
  24.     StatusLabel.Text = "Email sent successfully."

thx