For some reason I've yet to figure out, I have a SpringBoot application that works perfectly on an older iMac (MacOS 13), but that same Tomcat application using JavaMail will not work, that is, it won't send the email under Mac OS 11.1 and Java 11.
The Exception is: Exception reading response
Cause: java.net.SocketTimeoutException: Read timed out
I've done these tests:
Used the exact same Tomcat (mac) folder on the 11.1 machine. This Tomcat folder is the one that works perfectly sending email on the older iMac. Does not work under Mac 11.1.
Experimented with different Java versions. 8, 11, both Corretto, Oracle.
Made sure no Firewall rule was interfering.
Used VPN and no VPN and even VPN with different ports.
Went into the Mac's security settings to see if there was something there I had missed. Network settings, privacy settings, turned off Mac firewall, etc.
Noted that another service method that makes a connection to Twitter does work on the 11.1 Mac machine. So external connections do work, just not JavaMail.
I stepped through the service code on the Mac with 11.1 and it's all OK until the Transport.send() method. That doesn't work and it times out there.
Tried to use Charles proxy to see if that would help.
It seems to be something really odd with JavaMail.
The only thing I haven't been able to easily change on the new computer is the OS version itself (11.1).
And, I created a AWS instance, with same Tomcat version (9), copied the same SpringBoot app to it and, just like the older iMac, it worked! Email was sent.
I don't have a virus program installed. I had BitDefender, but it had so many bugs, I had to remove it.
So it seems the code is OK (works on older Mac and AWS instance) and there is something really weird going on with the 11.1 Mac OS. At least, that's my assumption based on an entire day trying to figure this out...
Would appreciate any and all suggestions.
Thanks!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…