PARAMS='--port=25 --tls=on --tls-starttls=on'
echo "Subject: test" | sendmail $PARAMS
I want to reuse a parameters, and use them in sendmail
.
Result: sendmail: fatal: usage: sendmail [options]
What am I doing wrong here?
The linked question suggests refactoring into a function, which works:
sendme() {
echo "test" | sendmail --port=25 --tls=on --tls-starttls=on
}
sendme