mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2024-12-26 11:03:06 +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) {
|
async function getAttachments(attachments) {
|
||||||
const globber = await glob.create(attachments.split(',').join('\n'))
|
const globber = await glob.create(attachments.split(',').join('\n'))
|
||||||
const files = await globber.glob()
|
const files = await globber.glob()
|
||||||
return files
|
return files.map(f => ({ path: f }))
|
||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
@ -73,8 +73,6 @@ async function main() {
|
|||||||
} : undefined,
|
} : undefined,
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log(await getAttachments(attachments))
|
|
||||||
|
|
||||||
const info = await transport.sendMail({
|
const info = await transport.sendMail({
|
||||||
from: getFrom(from, username),
|
from: getFrom(from, username),
|
||||||
to: to,
|
to: to,
|
||||||
|
Loading…
Reference in New Issue
Block a user