mirror of
https://github.com/mt-mods/mail.git
synced 2025-07-07 07:00:31 -04:00
Significantly improve maillist behaviour
Replace maillist by its players when sending a message List of players separated by , Avoid doublons when editing more than 2 times a maillist
This commit is contained in:
parent
1e6e06e56f
commit
c4dd235782
4 changed files with 36 additions and 61 deletions
3
api.lua
3
api.lua
|
@ -47,11 +47,14 @@ function mail.send(...)
|
|||
-- normalize to, cc and bcc while compiling a list of all recipients
|
||||
local recipients = {}
|
||||
local undeliverable = {}
|
||||
m.to = mail.concat_player_list(mail.extractMaillists(m.to, m.from))
|
||||
m.to = mail.normalize_players_and_add_recipients(m.to, recipients, undeliverable)
|
||||
if m.cc then
|
||||
m.cc = mail.concat_player_list(mail.extractMaillists(m.cc, m.from))
|
||||
m.cc = mail.normalize_players_and_add_recipients(m.cc, recipients, undeliverable)
|
||||
end
|
||||
if m.bcc then
|
||||
m.bcc = mail.concat_player_list(mail.extractMaillists(m.bcc, m.from))
|
||||
m.bcc = mail.normalize_players_and_add_recipients(m.bcc, recipients, undeliverable)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue