Skip to main content

Build multipart message

Anatomy

<mail:multipart var="var" boundary="string">
ixml
</mail:multipart>

Description: MAIL:MULTIPART builds a MIME multipart message body according to RFC 2046.

Attributes

NameTypeDescriptionDefined By
varvarResult variable name mail:multipart
boundarystringBoundary delimiter mail:multipart

Results:

BindingTypePredicate
varstringN/A

Examples

Example

<mail:multipart var="rawbody" boundary="boundary">
<mail:part>
<mail:header>Content-Type: text/plain</mail:header>
<mail:body>This is the body of the message.</mail:body>
</mail:part>

<mail:part>
<mail:header>
Content-Type: text/html
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="message.html"
</mail:header>
<mail:body>PGh0bWw+CiAgPGhlYWQ+CiAgPC9oZWFkPgogIDxib2R5PgogICAgPHA+VGhpcyBpcyB0aGUgYm9keSBvZiB0aGUgbWVzc2FnZS48L3A+CiAgPC9ib2R5Pgo8L2h0bWw+Cg==</mail:body>
</mail:part>
</mail:multipart>

<output>$rawbody</output>