MIME Adapter

Usage

A MIME Adapter converts MIME messages to XML MIME, and XML MIME messages to MIME:

  • MIME > XML

    • If the attribute charset is missing in the content-type of a message, it is assumed that this MIME part’s content is US-ASCII encoded.

    • For multipart messages the charset value which was found at first, is used as default character set for all other MIME parts in case these do not have any charset parameters defined within their content-types.

  • XML > MIME

    For converting the following rules apply if the content in the XML is available as text instead of base64:

    • If in the XML the content-type is not defined explicitly, text/plain is assumed.

    • If the content-type is defined in the XML, then the message is sent with charset="UTF-8", because the content must be text, if the XML’s content is not base64-encoded.

Templates

There are following templates available for your convenience in the repository at Global > System > Mapping Templates > MIME Adapter.

  • AttachmentExample.mime

    Example message with an image as attachment

  • AttachmentExample.xml

    Example message with an image as attachment as MIME-XML

  • IBISMime1.0.xsd

    Schema file which describes the MIME XML format used in the INUBIT software and which is used for converting MIME>XML‑MIME.

  • Textexample.mime

    MIME example message

  • Textexample.xml

    MIME example message as MIME-XML

Message types

  • MIME > XML MIME

    The input message type is irrelevant because the message content is MIME encoded; the output message type must be XML.

  • XML MIME > MIME

    The input message must be XML; the output message type is irrelevant, because the message content is MIME encoded.

Example: MIME > XML MIME Conversion

Input message MIME format

Date: Thu, 27 Mar 2003 14:25:15 +0100 (GMT+01:00)
Mime-Version: 1.0
Content-Type: multipart/related;
  boundary="----=_Part_1404_1807448131.1048771342453"
Content-ID: 1e9aa068-78ac-1000-9e85-c0a80c7a0001
------=_Part_1404_1807448131.1048771342453
Content-Type: plain/text
Content-Transfer-Encoding: 8bit
Content-ID: 1e9aa068-78ac-1000-9e84-c0a80c7a0001
Content-Description: Document
Content-Disposition: inline
That is Part 1
------=_Part_1404_1807448131.1048771342453
Content-Type: plain/text
Content-Transfer-Encoding: 7bit
Content-ID: 1e802c92-78ac-1000-953c-40272c850001
Content-Description: Catalog
Content-Disposition: inline
That is Part 2
------=_Part_1404_1807448131.1048771342453--

Output message XML MIME

<?xml version="1.0" encoding="ISO-8859-1"?>
<IBISMime version="1.0">
  <Header name="Date" value="Thu, 27 Mar 2003 14:25:15 +0100 (GMT+01:00)"/>
  <Header name="Mime-Version" value="1.0"/>
  <Header name="Content-Type" value="multipart/related">
    <Parameter name="boundary" value="----=_Part_1404_1807448131.1048771342453"/>
  </Header>
  <Header name="Content-ID" value="1e9aa068-78ac-1000-9e85-c0a80c7a0001"/>
  <Header name="Message-ID" value="&lt;1330082.1053954922869.JavaMail.tf@obelix.inubit.com&gt;"/>
  <Part>
    <Header name="Content-Type" value="plain/text"/>
    <Header name="Content-Transfer-Encoding" value="7bit"/>
    <Header name="Content-ID" value="1e9aa068-78ac-1000-9e84-c0a80c7a0001"/>
    <Header name="Content-Description" value="Document"/>
    <Header name="Content-Disposition" value="inline"/>
    <Content>Thats Part 1</Content>
  </Part>
  <Part>
    <Header name="Content-Type" value="plain/text"/>
    <Header name="Content-Transfer-Encoding" value="7bit"/>
    <Header name="Content-ID" value="1e802c92-78ac-1000-953c-40272c850001"/>
    <Header name="Content-Description" value="Catalog"/>
    <Header name="Content-Disposition" value="inline"/>
    <Content>Thats Part 2</Content>
  </Part>
</IBISMime>

Dialog Descriptions in the MIME Adapter

MIME-XML Adapter Dialog in the MIME Adapter

XML output configuration

  • Use lowercase for header names

    Produces header names in lower case that can be conveniently accessed via XPath.

  • Always encode contents Base64

    Encodes MIME content with base64.

    If the option is not activated, then text contents (MimeType text/*) are written as text nodes underneath from Content.

  • Preserve Content-Transfer-Encoding if possible

    If this option is activated, then the coding of the input message remains unchanged for transporting if possible, that means plain text remains plain text and Base64 coded content will be passed unchanged. Input messages using other encodings are base64 encoded.

XML-MIME Adapter Dialog in the MIME Adapter

This format adapter has no configurable properties and is ready for immediate usage.