Hi, i wrote a small vb.net console application for sending emails to a gmail-account. The application works fine on my developement-system ( wondows 10). When i distribute the application to Windows server 2012 r2 the app did not send the email, the app termine without error but the email was not send. i try allready to switch firewall off, but without success. Anybody has a idea what can be wrong?
The code loke like this:
TryDim loMessage As MailMessage = NothingDim loClient As SmtpClient = Nothing
loClient = New SmtpClient()
loClient.Timeout = 50000
loClient.Host = "smtp.gmail.com"
loClient.Port = 587
loClient.EnableSsl = True
loClient.Credentials = New System.Net.NetworkCredential("firstname.lastname@example.org", "xxxxxxxxxx")
loMessage = New MailMessage()
loMessage.IsBodyHtml = True
loMessage.From = New MailAddress("email@example.com")
loMessage.Subject = "Betreff"
loMessage.Body = "Test Ihre Daten..."
Catch ex As Exception
'MsgBox(ex.ToString)Dim file As System.IO.StreamWriter
file = My.Computer.FileSystem.OpenTextFileWriter("c:\tmp\err.txt", True)
HI, I tried both in ConsoleApplication and in wpf...on another pc it WORKS on wpf application...I have on mine 2010 version...the same message appears on both applications...'c\....exe is missing. Looked over all google advices I could find, tried all but nth...in wpf it does not work on my pc either..but on another it does...???(code is copy/pasted)