mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2024-12-25 10:33:07 +07:00
main: that's it
This commit is contained in:
parent
47d3268091
commit
a1ab281c6f
4
main.js
4
main.js
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user