showing Error "Failure sending mail." please help me
i used port 587 because maximum example 587 used this port
how i can know the my mail port or it is right

error in this line

SMTP.Send(Mail)

massage is:- Just

"Failure sending mail."
Imports System.Net.Mail

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim Mail As New MailMessage
        Mail.Subject = "test email"
        Mail.To.Add("abcd@gmail.com")
        Mail.From = New MailAddress("abcd@gmail.com")
        Mail.Body = "test mail test mail 123456789 hi"
        Dim SMTP As New SmtpClient("smtp.gmail.com")
        SMTP.EnableSsl = True
        SMTP.Credentials = New System.Net.NetworkCredential("abcd@gmail.com", "***********************")
        SMTP.Port = 587
        SMTP.Send(Mail)
    End Sub
End Class
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.