Does anyone have experience with this unusual problem? As soon as I uninstall Jenkins (& restart tomcat), I can send java emails just fine through Tomcat. When I load the Jenkins war it breaks emails being sent immediately, by our other installed (custom) java apps in Tomcat. This server has been around for 6+ years, and the problem just starting occurring on Jan 24th of this year, without me knowing what changed. Looking at the smtp logs, it corrupts the mail before it leaves the system, before it hits the mail server. Replacing the original message with garbage like this example below:
SOMEHOW - The HTML messages gets turned into content type “text/plain”?
Curiously when I deleted the ‘work’ dir under tomcat it temporarily solved the problem, allowing emails to be sent properly/correctly, but email eventually became corrupt again, just min later, and deletion of the ‘work’ dir does nothing now (tried many times). I removed every mail related plugin in the .jenkins install dir, thinking the JVM was being corrupted with multiple java mail files, with no success/luck on the email send. Searched through the tomcat/markmail archive, Jenkins forum, and google with nothing really matching the described issue.
Env: Oracle Linux 7.9
Tomcat: 8.5.72 (tried with 8.5.65, when I know it was working)
Java: jdk1.8.0_311 (tried with 281, when I know it was working) & it fails with jdk 14
Apr: 1.7.0 / Apr-util: 1.6.1 / Openssl: 1.1.1l / tomcat-native: 1.2.31-src
Jenkins: 2.3612.1 LTS (tried several / various previous versions that I know worked)
Mail Jar: javax.mail-1.6.2-6.jar