Mail recipient failure

Manny123

Member
Joined
Mar 6, 2012
Messages
16
Programming Experience
Beginner
[XCODE]
Private Sub BtnSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSend.Click
Dim smtpServer As New SmtpClient
Dim mail As New MailMessage()
smtpServer.Credentials = New Net.NetworkCredential("gnekissalon@yahoo.co.uk", "*****")
smtpServer.Port = 995
smtpServer.Host = "smtp.mail.yahoo.co.uk"
smtpServer.EnableSsl = True
mail = New MailMessage()
mail.From = New MailAddress("gnekissalon@yahoo.co.uk")
mail.To.Add(txtTo.Text)
mail.Subject = txtsubject.Text
mail.Body = LstOrders.Text
smtpServer.Send(mail)[/XCODE]

When i click the button the button to send it gives me an error message of "Failure sending mail".:hurt:
this is the email i'm sending data to RebelP_supplies@yahoo.co.uk

Any ideas why it is failing?
 
"Failure sending mail"
You can catch SmtpException for the Send call, and check StatusCode for more information.

Most results seems to suggest 995 is a POP port, while 465 is the SMTP port.
 
Back
Top