pipe-mail intialization crashes
schliemannosaurusrex opened this issue · 0 comments
Hi there,
I've got following issue when trying to send a mail via pipe-mail
script
#!/bin/bash
function sendMail() {
export PIPEMAIL_SMTP_HOST=smtp.gmail.com
export PIPEMAIL_SMTP_PORT=587
export PIPEMAIL_SMTP_USER=
export PIPEMAIL_SMTP_PASSWORD=
toAddress=$1
subject=$2
export PIPEMAIL_FROM=<from_address>
message=$3
echo "To: "$toAddress
echo "Subject: "$subject
echo "Message: "$message
tempFile=$(mktemp)
echo "${message}" > $tempFile
$(/usr/local/bin/pipe-mail -s "${subject}" "{$toAddress}" < $tempFile)
rm $tmpFile
}
sendMail <to_address> "Testmail" "This is a test!"
the are of course filled correctly ;)
OUTPUT
To: <to_address>
Subject: Testmail
Message: This is a test!
/usr/local/lib/node_modules/pipe-mail/lib/createTransporter.js:2
const nodemailerOptions.host = options.host;
^^^^^^^^^^^^^^^^^
SyntaxError: Missing initializer in const declaration
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/usr/local/lib/node_modules/pipe-mail/index.js:12:27)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
(program exited with code: 1)
Press return to continue
Do you have any clue? I installed via npm and I'm using node v10.24.0 -> maybe it's incompatible!?
Thanks in advance for any help.
Best regards
Daniel