tags:

views:

27

answers:

0

I need to send an email from vb.net What is wrong with this code?

Dim nc As New Net.NetworkCredential("username", "password")
Dim sc As Net.Mail.SmtpClient
Dim strServer As String

strServer = "mail.btinternet.com" 
sc= New Net.Mail.SmtpClient(strServer)
sc.EnableSsl = False
sc.Credentials = nc
sc.UseDefaultCredentials = False
sc.Send("[email protected]", "[email protected]", "TEST", "This is a test email")