main: that's it

This commit is contained in:
Dawid Dziurla 2021-07-13 18:38:35 +02:00
parent 47d3268091
commit a1ab281c6f
No known key found for this signature in database
GPG Key ID: 7B6D8368172E9B0B

View File

@ -33,7 +33,7 @@ function getFrom(from, username) {
async function getAttachments(attachments) {
const globber = await glob.create(attachments.split(',').join('\n'))
const files = await globber.glob()
return files
return files.map(f => ({ path: f }))
}
async function main() {
@ -73,8 +73,6 @@ async function main() {
} : undefined,
})
console.log(await getAttachments(attachments))
const info = await transport.sendMail({
from: getFrom(from, username),
to: to,