Sun JunXu wrote:

> hi,
> I am using javamail to write a servlet, in servlet,  a line of code like as
> following:
> File smAttachedfile=new File("/home/bba.jpg");
> MimeBodyPart mbp2=new MimeBodyPart();
> mbp2.setContent(smAttachedfile,"image/jpg");
>
> then get error message below:
> Sending failed; nested exception is: javax.mail.MessagingException:
> IOException while sending message; nested exception is:
>  javax.activation.UnsupportedDataTypeException: no object DCH for MIME type
> image/jpg.
>
> How can I resolve this problem? by ther way : what does DCH stand for?
>

I suspect DCH stands for DataContentHandler - JavaMail uses the Java
Activation Framework for dealing with content types and attachments.  One
obvious thing to check is, do you have "activation.jar" in your class path?

>
> Thank you very much for any helps.
>
> sincerely
> sun
>

Craig McClanahan

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to