---
title: "Mail.SimpleMessage"
description: "Simple mail message prototype."
canonical_url: "https://www.zeyos.com/zymba/ref/mail/mail-simplemessage"
markdown_url: "https://www.zeyos.com/ai/guide/zymba/ref/mail/mail-simplemessage.md"
section: "zymba-reference"
authority: "reference"
language: "en"
source_repository: "https://cloud.zeyos.com/__doc/zymbaref.json"
source_sha256: "05a361c6ddc32e74f4a6dc16fd06f218210ff1b7ce57f26ca1994bfffc407915"
---

# Mail.SimpleMessage

## Mail.SimpleMessage

```
object @Mail.SimpleMessage(@Mail.Message) {
	construct() {}
	getBody(): string {}
	getBodyRaw(): string {}
	getCharset(): string {}
	isText(): bool {}
	setBody(string $body, ?string $encoding): $this {}
	setBodyRaw(string $body): $this {}
	setCharset(string $charset): $this {}
	setText(string $text, ?string $charset): $this {}
}
```

**Simple mail message prototype.**

### Prototype

**[Mail.Message](#)**

## Methods


### `$this.construct()`


```code
$this.construct(): void
```




### `$this.getBody()`


```code
$this.getBody(): string
```

##### Returns

| Type | Value |
| --- | ---  |
| `string` |  |




### `$this.getBodyRaw()`


```code
$this.getBodyRaw(): string
```

##### Returns

| Type | Value |
| --- | ---  |
| `string` |  |




### `$this.getCharset()`


Gets the character set of this message.

```code
$this.getCharset(): string
```

##### Returns

| Type | Value |
| --- | ---  |
| `string` |  |




### `$this.isText()`


```code
$this.isText(): bool
```

##### Returns

| Type | Value |
| --- | ---  |
| `bool` |  |




### `$this.setBody()`


```code
$this.setBody(string $body, ?string $encoding): this
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| body | `string`  |  | "" |
| encoding | `?string`  |  | current encoding |

##### Returns

| Type | Value |
| --- | ---  |
| `$this` |  |




### `$this.setBodyRaw()`


```code
$this.setBodyRaw(string $body): this
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| body | `string`  |  | "" |

##### Returns

| Type | Value |
| --- | ---  |
| `$this` |  |




### `$this.setCharset()`


```code
$this.setCharset(string $charset): this
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| charset | `string`  |  | "" |

##### Returns

| Type | Value |
| --- | ---  |
| `$this` |  |




### `$this.setText()`


```code
$this.setText(string $text, ?string $charset): this
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| text | `string`  |  | "" |
| charset | `?string`  |  | current charset or UTF-8 if empty |

##### Returns

| Type | Value |
| --- | ---  |
| `$this` |  |
