I have the following code that will work if I specify credentials, but I want to sent this without using credentials. Can someone tell me how to do this without specifying credentials? I setup an SMTP relay server that does not require credentials.
Please, no links. I think it's just one line of code that I don't have right or that needs to be added.
Dim strTo As String = "firstname.lastname@example.org"
Dim strFrom As String = "email@example.com"
Dim strSubject As String = "Subject"
Dim mailClient As New System.Net.Mail.SmtpClient("10.10.10.14", 25)
Dim strBody As String = "message"
Dim mailMessage As New System.Net.Mail.MailMessage(strFrom, strTo, strSubject, strBody)
'mailClient.UseDefaultCredentials = False
mailClient.DeliveryMethod = Net.Mail.SmtpDeliveryMethod.Network