Web Connection
wwsmtp strange behavior
Gravatar is a globally recognized avatar based on your email address. wwsmtp strange behavior
  Marcel DESMET
  All
  Mar 28, 2019 @ 12:31am

Hello,

I have some trouble to run wwsmpt in mailmode = 0

It runs with "set step on" but failed otherwise ( timeout error ) ?

[update]
I post previous message to quickly, it's ok with one provider (OVH) but not ok with another (ssl is .T. ) and the error message is "the remote certificate is invalid according to the validation procedure".
It seems there is a work around ( read on stackoverflow)
As a workaround, you can switch off certificate validation. Only ever do this to obtain confirmation that the error is being throw because of a bad certificate.

Gravatar is a globally recognized avatar based on your email address. re: wwsmtp strange behavior
  Rick Strahl
  Marcel DESMET
  Mar 28, 2019 @ 01:05pm

So the message means there's a problem with certificate validation. This means either the certificate is bad or the protocol used is unsupported.

Make sure you use a recent version of wwSmtp as there were changes to the default protocol support. You can manually set that in older versions. Basically if you're on older versions on non-Windows 8.1 or later the TLS version may be wrong which is very likely given the error message.

Here's more info on TLS 1.2 support:

TLS 1.2 in Web Connection/Client Tools

If that's not it then you probably have a bad certificate in which case it's probably not a good idea to use the server until the certificate gets fixed. Yes there are workarounds but it's really not a good idea as effectively the certificate is compromised.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: wwsmtp strange behavior
  Marcel DESMET
  Rick Strahl
  Mar 28, 2019 @ 01:56pm

Thank you for the reply

I continue to have problems at this point I am completely unable to send mails with ssl in net mode with various smtp servers, here is the end of a tracelog

System.Net Information: 0 : [2008] Associating SmtpConnection#21454193 with SmtpPooledStream#3741682
System.Net.Sockets Verbose: 0 : [2008] Entering Socket#58870012::Receive()
System.Net.Sockets Verbose: 0 : [5476] Entering Socket#58870012::Dispose()
System.Net Verbose: 0 : [5476] Entering SmtpPooledStream::Dispose #3741682
System.Net Verbose: 0 : [5476] Exiting SmtpPooledStream::Dispose #3741682
System.Net.Sockets Error: 0 : [2008] Socket#58870012::UpdateStatusAfterSocketError() - Interrupted
System.Net.Sockets Error: 0 : [2008] Exception in Socket#58870012::Receive - A blocking operation was interrupted by a call to WSACancelBlockingCall.
System.Net.Sockets Verbose: 0 : [2008] Exiting Socket#58870012::Receive() 	-> Int32#0
System.Net Error: 0 : [2008] Exception in SmtpClient#49205706::Send - Unable to read data from the transport connection: A blocking operation was interrupted by a call to WSACancelBlockingCall..
  at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
  at System.Net.DelegatedStream.Read(Byte[] buffer, Int32 offset, Int32 count)
  at System.Net.BufferedReadStream.Read(Byte[] buffer, Int32 offset, Int32 count)
  at System.Net.Mail.SmtpReplyReaderFactory.ReadLines(SmtpReplyReader caller, Boolean oneLine)
  at System.Net.Mail.SmtpReplyReaderFactory.ReadLine(SmtpReplyReader caller)
  at System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint)
  at System.Net.Mail.SmtpTransport.GetConnection(ServicePoint servicePoint)
  at System.Net.Mail.SmtpClient.GetConnection()
  at System.Net.Mail.SmtpClient.Send(MailMessage message)
System.Net Verbose: 0 : [2008] Exiting SmtpClient#49205706::Send() 

Gravatar is a globally recognized avatar based on your email address. re: wwsmtp strange behavior
  Rick Strahl
  Marcel DESMET
  Mar 28, 2019 @ 01:59pm

Check your firewall and make sure your app is allowed to send on the SMTP port. Also make sure you're using the right port to connect to your server. Firewall and AV can be a real bitch to figure out, but that's the first you should check. Start by turning things off and see if that works, then make sure to turn back on and add exceptions if it does work with everything off.

I use wwSMTP daily with SSL (heck you're probably reading this email from it right now 😃) so it definitely works...

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: wwsmtp strange behavior
  Marcel DESMET
  Rick Strahl
  Mar 28, 2019 @ 02:15pm

Any how or "what" Thunderbird seems to be able to pass through 😃

Gravatar is a globally recognized avatar based on your email address. re: wwsmtp strange behavior
  Marcel DESMET
  Rick Strahl
  Mar 28, 2019 @ 03:41pm

Just create a new method and replace your wwsmtp with a ActiveX ( Chilkat that i use for other stuff's ) and it run's at the first test. So it's obviously a Microsoft versus Microsoft problem ..

Gravatar is a globally recognized avatar based on your email address. re: wwsmtp strange behavior
  Rick Strahl
  Marcel DESMET
  Mar 28, 2019 @ 03:45pm

Use Chilcat

That doesn't work because there's a licensing issue - I can't embed a commercial control into a developer tool that is redistributed (at least not without an insanely expensive license).

And in any case if you have network issues (firewall, proxy, whatever) that won't be magically fixed by a different control...

Any how or "what" Thunderbird seems to be able to pass through ??

You don't understand how Firewalls and Anti Virus works on Windows I guess. There are rules that can and usually will prevent applications from sending outbound traffic on random ports and especially on the SMTP ports. An app like Thunderbird typically installs with Firewall rules that make sure that the port use is registered.

Also make sure you have this in your MyApp.exe.config or vfp9.exe.config especially if you're loading the application you are running off a network drive. Running of a network drive without will change your security environment and that may also cause SMTP outbound ports to fail.

Loading Assemblies from Network Locations

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: wwsmtp strange behavior
  Marcel DESMET
  Rick Strahl
  Mar 28, 2019 @ 04:02pm

Sorry for my poor English, I seems you misunderstand me I am a Chilkat license owner.
Any how thank you for your work and your help, I am a daily user of your tools .. 😃

Gravatar is a globally recognized avatar based on your email address. re: wwsmtp strange behavior
  Rick Strahl
  Marcel DESMET
  Mar 28, 2019 @ 04:22pm

Hi Marcel,

Sorry if the last email sounded a bit rough.

I get the frustrations that can arise.

ChilKat is a great tool and if you have a license for it - go ahead and use it. It is easier and has no dependency on .NET and some of the idiosyncrasies that go with it. I had considered using a third party tool for the SMTP features in the past, but licensing is too prohibitive for our redistributive model. In fact it wasn't even allowed.

The .NET solution is an easy one given that .NET is now installed on just about any Windows machine and in most situations all of that works fine. Except when extra tools (usually Anti-Virus) gets in the way. AV will definitely capture .NET components making outbound calls, but they may not see raw socket tool doing the same.

IAC - network issues are a problem for all tools regardless of what platform they use (Win32, raw Sockets - ie. Chilkat, or .NET)...

It's frustrating for me because most of these issues are not ones that I can control from the tools as they are environment specific and often administrator level issues.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: wwsmtp strange behavior
  Rick Strahl
  Marcel DESMET
  Mar 28, 2019 @ 04:29pm

Re: your original message. The problem is most likely the TLS version on Windows. And the post I referenced has the workarounds which are pretty easy for the .NET side of things. For .NET the main thing is to either use a recent version of our tools which all have the appropriate flags set, or to manually set the TLS version flags in your startup code.

If that's not it, then the certificate likely isn't using a recent version of TLS (ie. TLS 1.2 which by now EVERYTHING should be using since everything below can be easily cracked with current hardware). It may work with ChilKat because they probably allow the lower level certificates.

The .NET flag lets you specify which protocol versions to support all the way back to SSL3 (TLS1,TLS11,TLS12 are the other option if I remember right). I think .NET purposefully makes an effort to deprecate insecure technologies as soon as its a viable option.

+++ Rick ---

© 1996-2024