Checking network not available

It was discussed more than once how to check if the network is available by simple doing the task you want to do. But how do I check that the network is not available?

My app can download external content from emails. Some servers may not be available. How do I check this against a general problem with the network? My app is not a browser and needs to download a lot of files. Therefore, even error messages aren’t a good idea. Any 404 error simply is ignored. If the image is gone then it’s gone. But I also don’t want to waste time with trying to download images when the network isn’t available anymore.

https://documentation.xojo.com/api/networking/network.html

use Network.IsConnected to check for a (local?) network connection.
Then use Network.LookupIPAddress(DNSAddress as String) As String to check if you can reach the domain. Returns “” if it’s not reachable.

Very good. I’ll add a check and let the user try that.

You can even check smtp by testing using chilkat plugin or by

If NetworkLookupIpAddress("smtp.mydomain.com") <> "" then //should be reachable End if