Error occured during attachment of file.

The_Small_k

The_Small_k

@the-small-k Oct 25, 2024
Hello guy's
I want to attach some files using java in my Email Application.SO i used MimeMultipart class but i got some error like this
Exception caught 
javax.mail.MessagingException: IOException while sending message;
  nested exception is:
    javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed; 
    boundary="----=_Part_0_31510384.1309567547673"
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:625)
    at javax.mail.Transport.send0(Transport.java:169)
    at javax.mail.Transport.send(Transport.java:98)
    at MultipartExample.<init>(MultipartExample.java:43)
    at MultipartExample.main(MultipartExample.java:53)
Caused by: javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed; 
    boundary="----=_Part_0_31510384.1309567547673"
    at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:891)
    at javax.activation.DataHandler.writeTo(DataHandler.java:317)
    at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1350)
    at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1683)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:585)
    ... 4 more
Any idea how to fix it ?

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform