223.4. 예
from(...).marshal().mimeMultipart()
Content-Type 헤더가 설정되지 않은 메시지를 사용하여 다음 메시지 Camel 헤더를 사용하여 메시지를 생성합니다.
Camel 메시지 헤더
Content-Type=multipart/mixed; \n boundary="----=_Part_0_14180567.1447658227051"
Message-Id=<...>
MIME-Version=1.0
The message body will be:
Camel 메시지 result
------=_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);
은 Camel 헤더로 설정된 특정 MIME 헤더(Message-Type 헤더가 Camel 메시지에서 제거됨)와 "x-"로 시작하는 원본 메시지의 모든 헤더도 포함하는 다음 메시지 본문과 이름이 "included"인 헤더 없이 메시지를 생성합니다.
Camel 메시지 result
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