mirror of
https://github.com/KumoCorp/kumomta.git
synced 2026-09-06 16:00:51 +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.
22 lines
586 B
Markdown
22 lines
586 B
Markdown
# recipient
|
|
|
|
```lua
|
|
message:recipient()
|
|
```
|
|
|
|
Returns the envelope recipient of the message. The return value is an
|
|
[EnvelopeAddress](../address/index.md)
|
|
|
|
See also [message:sender](sender.md).
|
|
|
|
## Recipient List
|
|
|
|
{{since('dev')}}
|
|
|
|
If the message is part of an SMTP batch with more than a single recipient then
|
|
this method can return an array style table holding one
|
|
[EnvelopeAddress](../address/index.md) for each recipient.
|
|
|
|
If you'd rather always deal with a list of recipients, even if there is
|
|
just a single recipient, then you can use [message:recipient_list](recipient_list.md).
|