Do not add attachment in case it's not specified

This commit is contained in:
Roman Isko 2020-04-07 09:50:06 +03:00
parent d4b4fe8144
commit a5cba0b6c1

View File

@ -48,9 +48,9 @@ async function main() {
subject: subject,
text: content_type != "text/html" ? get_body(body) : undefined,
html: content_type == "text/html" ? get_body(body) : undefined,
attachments: {
attachments: attach_file ? {
path: attach_file
}
} : undefined
})
console.log(info)