UnsupportedDataTypeException when sending new message

  • Share
  • Share

Applies to:
NA

Description:
Occurs while sending a message with unsupported content

Cause:
You probably set some content for your message using the setContent(Object o, String type) method.

JAVA-Mail ,

  1. admin
    March 20th, 2009 at 10:28 | #1

    For this to work, there must be a JAF DataContentHandler registered for the given “type”. If not, you will get the UnsupportedDataTypeException. In most cases the simplest workaround is to use a ByteArrayDataSource.

  1. No trackbacks yet.