I have not found any answer on Daniweb neither on the web.
What I need is a winform that send an e-mail using the Exchange Server on the local network are and authenticate with the current domain user without entering credentials.
It is possible?
I have this code? Can anyone confirm if im making this the correct way?
Dim server As String = "" Dim port As Integer = "" Dim from As String = "" Dim [to] As String = "" Dim subject As String = "Message subject" Dim body As String = "Body message" Dim message As New MailMessage(from, [to], subject, body) Dim client As New SmtpClient(server, port) client.Credentials = CredentialCache.DefaultNetworkCredentials Try client.Send(message) Catch ex As Exception MsgBox(ex) End Try
Edited by jeansantos