Currently I\'m inline of writing a code that will be listening to a directory. when the directory is updated with .apk file, I\'ll send a mail with this .apk file to a gmail
Even I had faced same issue. I tried different versions of javamail it didnt work. The problem was Transport.send() was using MailCapCommandMap class from the default java jdk (JAVA 8 in my case) that loaded outdated mailcap files.
So I used the latest version of JAVA after which it used MailCapCommandMap from the activation package which loaded the correct mailcap file.
If any anyone faces same problem in future just add a breakpoint in MailCapCommandMap classes available so that u know which mailcap file it is using.