mirror of
https://github.com/mailscope/kumomta.git
synced 2026-08-19 02:48:18 +00:00
42bf5c5e61
We've been hoping that mkdocs-material will ship the much anticipated search enhancements for some time, but it's time to recognize that we need to do something to improve the search results with how things work right now. This is a big commit that changes the titles of the various pages from the code-annotated synopsis to just the name of the function. This makes it much easier now to match things like `kumo.reject` directly, but `reject` remains awkward to find. I think this is the best that we can do at this time. A few functions have been annotated with the `status: deprecated` to show as deprecated in the toc/nav (shows with a little trash can next to the name).
43 lines
1.2 KiB
Markdown
43 lines
1.2 KiB
Markdown
---
|
|
tags:
|
|
- meta
|
|
---
|
|
|
|
# get_meta
|
|
|
|
```lua
|
|
message:get_meta(KEY)
|
|
```
|
|
|
|
Messages are associated with some metadata. You can think of this metadata
|
|
as being equivalent to a JSON object.
|
|
|
|
The `get_meta` method allows you to retrieve a field of that object.
|
|
|
|
```lua
|
|
msg:set_meta('foo', 'bar')
|
|
print(msg:get_meta 'foo') -- prints 'bar'
|
|
```
|
|
|
|
See also [msg:set_meta](set_meta.md).
|
|
|
|
## Pre-defined meta values
|
|
|
|
The following meta values are unique to the message scope:
|
|
|
|
<style>
|
|
table tbody tr td:nth-of-type(2) {
|
|
white-space: nowrap;
|
|
}
|
|
</style>
|
|
|
|
|Scope|Name|Purpose|Since|
|
|
|----|----|-------|-----|
|
|
|Message|`queue`|specify the name of the queue to which the message will be queued. Must be a string value.||
|
|
|Message|`tenant`|specify the name/identifier of the tenant, if any. Must be a string value.||
|
|
|Message|`campaign`|specify the name/identifier of the campaign. Must be a string value.||
|
|
|Message|`routing_domain`|Overrides the domain of the recipient domain for routing purposes.|{{since('2023.08.22-4d895015', inline=True)}}|
|
|
|
|
!!! Note
|
|
Additional metadata is available in the message scope that is copied in from the connection scope, for a full list of all available metadata, see the [Predefined Metadata](../metadata.md) page.
|