Hey guys! Sorry to invade this thread but why isn't this working?
Dim sendto = "matt@mattireland.co.uk"
Private Sub Send1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Send1.Click
'create the mail message
Dim mail As New Net.Mail.MailMessage()
'set the addresses
mail.From = New Net.Mail.MailAddress("program@program.com")
mail.To.Add("matt@mattireland.co.uk")
'set the content
mail.Subject = "testing"
mail.Body = "testing program"
'send the message
Dim smtp As New Net.Mail.SmtpClient("127.0.0.1")
smtp.Send(mail)
MsgBox("The message has been sent to: " & sendto)
End Sub
I get an unhandled exception error and it says that the sending has failed. Thanks!