Your code is quite crude or sending email using asp.net.
You have to make 4 objects to send a message in the order I put them in below.
Dim netMail As New MailMessage
Dim mailClient As New SmtpClient
Dim smtp_credentials As Net.NetworkCredential
Dim mailException As New SmtpException
netMail is the Sender/Body stuff
mailClient is for the credentials
smtp_credentials is for connecting to the mail server
mailException is for diagnostics, figure out whats wrong
netMail.Sender = new MailAddress("website", "<email@example.com>")
netMail.From = new MailAddress("website", "<firstname.lastname@example.org>")
netMail.ReplyToList.Add(new MailAddress("website", "<email@example.com>"))
netMail.to(new MailAddress("website", "<firstname.lastname@example.org>"))
netMail.Subject = "blah"
netmail.Body = "text"
mailClient.UseDefaultCredentials = False
smtp_credentials = New Net.NetworkCredential
smtp_credentials.Domain = "DomainName"
smtp_credentials.UserName = "LoginID"
smtp_credentials.Password = "Password"
mailClient.Credentials = smtp_credentials
mailClient.DeliveryMethod = SmtpDeliveryMethod.Network
mailClient.Host = "ServerAddress"
mailClient.Port = "SMTP_PortNum"
The mailClient sends the netmail, which is everthing needed to transmit
Your going to have to play around with the credentials. The above sends to a virvirtual SMTP server
You have to wrap the email address in brackets, for other servers to pick it up
Sending email is tricky, and takes alot of testing to make sure it works for all email addresses.
I expanded the edit box, and the overflow disappeared on firefox. so I lost focus on the text to the right and can't get it back.