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


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.From = New MailAddress("")
        Mail.Body = "test mail test mail 123456789 hi"
        Dim SMTP As New SmtpClient("")
        SMTP.EnableSsl = True
        SMTP.Credentials = New System.Net.NetworkCredential("", "***********************")
        SMTP.Port = 587
    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 learning and sharing knowledge.