From a5cba0b6c1f47a99f3425f08d8f4e1fc2630eaa0 Mon Sep 17 00:00:00 2001 From: Roman Isko Date: Tue, 7 Apr 2020 09:50:06 +0300 Subject: [PATCH] Do not add attachment in case it's not specified --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 4d21a0e4..d758ee52 100644 --- a/main.js +++ b/main.js @@ -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)