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"
Mail.From = New MailAddress("firstname.lastname@example.org")
Mail.Body = "Test Body"
Dim SMTP As New SmtpClient("smtp.mail.yahoo.co.uk")
SMTP.EnableSsl = True
SMTP.Credentials = New System.Net.NetworkCredential("username", "password")
SMTP.Port = "110"
Can anyone see where I am going wrong ? It just comes up with an error, fail to send.
Sorry got it working, I had the wrong port. Thanks anyway.
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.