Click here to Skip to main content
15,908,172 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
Questionprojet Pin
Hajem Hajer23-May-16 7:56
Hajem Hajer23-May-16 7:56 
AnswerRe: projet Pin
Eddy Vluggen23-May-16 8:49
professionalEddy Vluggen23-May-16 8:49 
GeneralRe: projet Pin
Dave Kreskowiak23-May-16 9:53
mveDave Kreskowiak23-May-16 9:53 
GeneralRe: projet Pin
Pete O'Hanlon23-May-16 10:05
mvePete O'Hanlon23-May-16 10:05 
QuestionDatagridview Problem Pin
Tanaji.C22-May-16 20:49
professionalTanaji.C22-May-16 20:49 
SuggestionRe: datagridview drill down Pin
Richard MacCutchan22-May-16 20:50
mveRichard MacCutchan22-May-16 20:50 
QuestionHow Many versions of the CLR can be installed on a computer ??? Pin
Derek Tortonian19-May-16 9:36
Derek Tortonian19-May-16 9:36 
AnswerRe: How Many versions of the CLR can be installed on a computer ??? Pin
Richard Deeming19-May-16 10:29
mveRichard Deeming19-May-16 10:29 
AnswerRe: How Many versions of the CLR can be installed on a computer ??? Pin
Dave Kreskowiak20-May-16 2:22
mveDave Kreskowiak20-May-16 2:22 
GeneralRe: How Many versions of the CLR can be installed on a computer ??? Pin
Derek Tortonian20-May-16 8:58
Derek Tortonian20-May-16 8:58 
QuestionConnecting to SQL database Pin
Member 1228398616-May-16 1:53
Member 1228398616-May-16 1:53 
AnswerRe: Connecting to SQL database Pin
Dave Kreskowiak16-May-16 2:47
mveDave Kreskowiak16-May-16 2:47 
GeneralRe: Connecting to SQL database Pin
Member 1228398616-May-16 2:57
Member 1228398616-May-16 2:57 
QuestionExporting excel chart to PNG - a generic error occurred in GDI+ - VB.NET Pin
WesselVB16-May-16 0:37
WesselVB16-May-16 0:37 
AnswerRe: Exporting excel chart to PNG - a generic error occurred in GDI+ - VB.NET Pin
Simon_Whale16-May-16 0:52
Simon_Whale16-May-16 0:52 
AnswerRe: Exporting excel chart to PNG - a generic error occurred in GDI+ - VB.NET Pin
Richard Deeming16-May-16 1:04
mveRichard Deeming16-May-16 1:04 
Questionsystem overflow exception on an arithmetic operation Pin
Member 1063639915-May-16 0:11
Member 1063639915-May-16 0:11 
AnswerRe: system overflow exception on an arithmetic operation Pin
Dave Kreskowiak15-May-16 3:09
mveDave Kreskowiak15-May-16 3:09 
QuestionCOM Interop Pin
JackMisani9-May-16 7:16
JackMisani9-May-16 7:16 
AnswerRe: COM Interop Pin
Nathan Minier10-May-16 1:20
professionalNathan Minier10-May-16 1:20 
GeneralRe: COM Interop Pin
JackMisani10-May-16 2:28
JackMisani10-May-16 2:28 
GeneralRe: COM Interop Pin
Dave Kreskowiak10-May-16 5:02
mveDave Kreskowiak10-May-16 5:02 
SuggestionRe: COM Interop Pin
Richard Deeming10-May-16 8:02
mveRichard Deeming10-May-16 8:02 
GeneralRe: COM Interop Pin
Nathan Minier11-May-16 1:19
professionalNathan Minier11-May-16 1:19 
QuestionSmtpClient not working in Windows Server 2012 R2 Pin
drentsch9-May-16 5:09
drentsch9-May-16 5:09 
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:

VB.NET
Imports System.IO
Imports System.Net.Mail
Imports System.Net

Sub Main()
Try
Dim loMessage As MailMessage = Nothing
Dim 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("test@gmail.com", "xxxxxxxxxx")

loMessage = New MailMessage()
loMessage.IsBodyHtml = True
loMessage.From = New MailAddress("xxxxxx@gmail.com")
loMessage.To.Add(New MailAddress("xxxxxx@bluewin.ch"))
loMessage.Subject = "Betreff"
loMessage.Body = "Test Ihre Daten..."

loClient.Send(loMessage)

Catch ex As Exception
'MsgBox(ex.ToString)
Dim file As System.IO.StreamWriter
file = My.Computer.FileSystem.OpenTextFileWriter("c:\tmp\err.txt", True)
file.WriteLine(ex.ToString)
file.Close()

End Try
End Sub

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.