mirror of
https://github.com/KumoCorp/kumomta.git
synced 2026-09-11 08:01:14 +00:00
message:recipient() may now return an array style table holding the recipient list, if there is more than a single recipient on the message. Since this can be somewhat ambiguous/frustrating to work with, there is now also a message:recipient_list() that will always return an array style table, even if it holds just a single element. The included helpers have been updated to use `message:recipient_list`. message:set_recipient() will now optionally accept an array style table holding the recipient list to be set.
30 lines
661 B
Markdown
30 lines
661 B
Markdown
# set_recipient
|
|
|
|
```lua
|
|
message:set_recipient(ENVELOPE)
|
|
```
|
|
|
|
{{since('2023.08.22-4d895015')}}
|
|
|
|
Sets the envelope recipient of the message. The value can be an
|
|
[EnvelopeAddress](../address/index.md) or a string that can be
|
|
parsed into an `EnvelopeAddress`.
|
|
|
|
```lua
|
|
message:set_recipient 'someone.else@example.com'
|
|
```
|
|
|
|
See also [message:set_sender](set_sender.md).
|
|
|
|
## Recipient List
|
|
|
|
{{since('dev')}}
|
|
|
|
The value can be an array style table holding one `EnvelopeAddress` for each
|
|
recipient that you wish to assign to the message.
|
|
|
|
!!! note
|
|
At the time of writing, only the SMTP and maildir delivery protocols have
|
|
support for multi-recipient messages.
|
|
|