Right OK, I want to create this mailing feature of one of my programs. So you were very helpful and gave me the namespace I needed to research. I initially tried it and had problems with the relay server and now I'm trying to fix these:
Sub Authenticate()
'create the mail message
Dim mail As New MailMessage()
'set the addresses
mail.From = New MailAddress(“matt@mattireland.co.uk”, Matt Ireland)
mail.To.Add(“eg@example.net”, “Mr Example”)
'set the content
mail.Subject = "Testing"
mail.Body = "Testing email"
'send the message
Dim smtp As New SmtpClient("127.0.0.1")
'to authenticate we set the username and password properites on the SmtpClient
‘what do I do with this bit???
smtp.Credentials = New NetworkCredential("username", "password")
smtp.Send(mail)
End Sub 'Authenticate
I'm not sure what to do with the bit that I've marked. Please could someone help? I'm still a real noob in this area so haven't quite grasped the relay server bit yet. Goodness: and I thought that DX was the hardest VB got!