224.4. 예
from(...).marshal().mimeMultipart()
Content-Type 헤더가 설정되지 않은 메시지를 사용하면 다음과 같은 메시지 Camel 헤더가 포함된 Message가 생성됩니다.
Camel 메시지 헤더
Content-Type=multipart/mixed; \n boundary="----=_Part_0_14180567.1447658227051"
Message-Id=<...>
MIME-Version=1.0
The message body will be:
Camel Message Body
------=_Part_0_14180567.1447658227051
Content-Type: application/octet-stream
Content-Transfer-Encoding: base64
Qm9keSB0ZXh0
------=_Part_0_14180567.1447658227051
Content-Type: application/binary
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Attachment File Name"
AAECAwQFBgc=
------=_Part_0_14180567.1447658227051--
Content-Type 헤더가 경로에 전송된 "text/plain"으로 설정된 메시지
from("...").marshal().mimeMultipart("related", true, true, "(included|x-.*)", true);
는 특정 MIME 헤더를 Camel 헤더로 설정하지 않고 메시지를 생성합니다(Content-Type 헤더는 Camel 메시지에서 제거됨) 및 "x-"로 시작하는 원래 메시지의 모든 헤더와 "included"로 시작하는 헤더도 포함하는 다음 메시지 본문을 생성합니다.
Camel Message Body
Message-ID: <...>
MIME-Version: 1.0
Content-Type: multipart/related;
boundary="----=_Part_0_1134128170.1447659361365"
x-bar: also there
included: must be included
x-foo: any value
------=_Part_0_1134128170.1447659361365
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
Body text
------=_Part_0_1134128170.1447659361365
Content-Type: application/binary
Content-Transfer-Encoding: binary
Content-Disposition: attachment; filename="Attachment File Name"
[binary content]
------=_Part_0_1134128170.1447659361365