This is a problem with a simple DOT NET 2 application which sends emai using system.net.mail.
It works fine here at the office on my notebook with a nuber of SMTP servers.
However at the client's site (I change the SMTP server/port to the one they need to use), the email function hangs and after a long time (Several minutes) gives a timeout error message. In the meantime while I am waiting I cannot end the process even if I used task manager.
I can ping the mail server and get the three expected replies.
I am not sure where to begin to diagnose the problem. It is on a large corporate network and I cannot hook my notebook into it and they are locked down so I cannot install another email client to test.
Dim eMail As New MailMessage
.From = New System.Net.Mail.MailAddress(sEmailReplyTo)
Dim recipient As System.Net.Mail.MailAddress = New System.Net.Mail.MailAddress(Trim(sEmail))
.Subject = "WTS for " & sLocation
.Body = _
"Attention: " & sContact & vbCrLf & _
"Subject: # Edited by ModernMatt #" & vbCrLf & _
"Location: " & sLocation & vbCrLf & _
"Call Date: " & sCallDate & vbCrLf & vbCrLf & _
.Attachments.Add(New Net.Mail.Attachment(di.FullName & "\" & Trim(sAttach)))
.IsBodyHtml = False
Dim smtpclient As New System.Net.Mail.SmtpClient
smtpclient.Host = sSMTPServer
smtpclient.Port = sSMTPPort '1025
If sSMTPUser <> "" Then
smtpclient.Credentials = New System.Net.NetworkCredential(sSMTPUser, sSMTPPassword)
Catch exEmail As Exception
DisplayStatus("Email processing failed while processing:" & vbCrLf & sTrans & vbCrLf & exEmail.Message, True)