I am trying to figure out a longstanding issue we've had with sending emails. We are using an older version of the dlls (2011-03-09) but the problem is present when I use the latest trial versions available on the site.
Whenever we send the email, there is a long pause before the .send() function returns. We receive the sent email on our phones/email clients within 3-5 seconds of the send() command being called, yet it takes another 20-30 seconds before the function returns.
I attempted to use the FileLogWriter to record any debug info, but the log file contains nothing but the first two lines about "opening the log file" and "using filelogwriter version..."
Any idea what could be causing this delay? Maybe its a setting we can change on our exchange server? A command we can change in the code?
Using client As New Rebex.Net.Smtp()
'accept any certificate, and add our.mailserver.com as a valid response name
Dim par As New TlsParameters()
par.CertificateRequestHandler = CertificateRequestHandler.NoCertificate
par.CommonName = "our.mailserver.com"
client.Connect("18.104.22.168", 587, par, SmtpSecurity.Explicit)
Dim email As New MailMessage
email.From = New MailAddress("doNotReply@our.mailserver.com")
...add the email contents...