I am sending an email using vb.net and for some strange reason I am being told that the 'To' property is read only! Can anyone tell me why this is occurring???
Exception Details: System.MissingMemberException: Property 'To' is ReadOnly.
Dim message = New MailMessage()
message.To = New MailAddress("email@example.com")
message.From = "firstname.lastname@example.org"
message.Subject = Request.Form("SubjectTextBox")
message.Body = Request.Form("ContentTextBox")
Dim smtp = New SmtpClient()
ErrorMessage.Text = "Your E-mail has been sent - Thank You"
Catch ex As Exception
Response.Write("Send failure: " + ex.ToString())