hello i am trying to send an email with yahoo. but i'm getting an error i dont understand, can someone plz help.. my code is bellow...
Code:Imports System.Net.Mail Public Class Form1 Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Try Dim mail As New MailMessage mail.Subject = subbox.Text mail.To.Add(toBox.Text) mail.From = New MailAddress(frombox) mail.Body = bodybox.Text 'is a richtextbox Dim SMTP As New SmtpClient("plus.smtp.yahoo.com)' i also tried "smtp.yahoo.com" SMTP.EnableSsl = True SMTP.Credentials = New System.Net.NetworkCredential(userbox.Text, passbox.Text) SMTP.Port = "465" ' i also tried "587" SMTP.Send(mail) MessageBox.Show("Message Sent") Catch ex As Exception MessageBox.Show("Error ", ex.Message) End Try End Sub




Reply With Quote