hi,
I use this code for smtp mail in vb.net
try
Dim SmtpServer As New SmtpClient()
Dim mail As New MailMessage()
SmtpServer.Credentials = New Net.NetworkCredential("username@gmail.com", "password")
SmtpServer.Port = 25
SmtpServer.Host = "smtp.gmail.com"
SmtpServer.EnableSsl = True
mail = New MailMessage()
mail.From = New MailAddress("asokmailworld@gmail.com")
mail.To.Add("sekar.mca2009@gmail.com")
mail.Subject = "Test Mail"
mail.Body = "This is for testing SMTP mail from GMAIL"
SmtpServer.Send(mail)
MsgBox("mail sent")
Catch ex As Exception
MsgBox(ex.Message)
End Try
I got this error how to solve this error
To attempt fixing network connectivity problems, click Tools, and then click "Diagnose Connection Problems..."
Regards
Sekar.c