08.12.2022, 07:35
Use this:
Code:
to = { 'user1@example.com', 'user2@example.com', 'user3@example.com' }
for index, email in ipairs(to) do
to[ index ] = '<' .. tostring(email) .. '>'
end
--Create e-mail header
settings.source = smtp.message{
headers = {
from = '' .. alias_from .. ' ' .. from .. '',
to = table.concat(to, ', '),
subject = subject
},