javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed; boundary

前端 未结 11 2430
暖寄归人
暖寄归人 2020-12-03 17:01

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

11条回答
  •  萌比男神i
    2020-12-03 17:26

    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.

提交回复
热议问题