When the SYN-ACK is received with a delay higher than 100ms, openSSL reports "connecting failed - no more retries". Added a logical retry loop: in this case wait 1 second and then retry (max 3 attempts) to resolve this. Verified by debugging: Mail sending now works with clumnsy-generated lags of 300-900 ms (other lags should be tried in testing).
When the SYN-ACK is received with a delay higher than 100ms, openSSL reports "connecting failed - no more retries". Added a logical retry loop: in this case wait 1 second and then retry (max 3 attempts) to resolve this. Verified by debugging: Mail sending now works with clumnsy-generated lags of 300-900 ms (other lags should be tried in testing).