---
title: "mail:multipart — Build multipart message"
description: "iXML command mail:multipart: Build multipart message."
canonical_url: "https://www.zeyos.com/ixml/ref/mail-multipart"
markdown_url: "https://www.zeyos.com/ai/guide/ixml/ref/mail-multipart.md"
section: "ixml-reference"
authority: "reference"
language: "en"
source_repository: "https://cloud.zeyos.com/__doc/ixmldoc.xml"
source_sha256: "a23f04e6a98628ca3c273c3b8dd2c33c034cfda3e0f00478d8793074fd2f70dd"
---

# mail:multipart — Build multipart message

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

### Attributes
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| var | var |  | Result variable name |
| boundary | string |  | Boundary delimiter |

### Children
- (none)

### Parents
- (not restricted in the reference)

### Result
- binding: var; type: string

### Examples

```xml
<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>
```
