Really like this script. I updated to 2.0.6 and have another suggestion for next release. Can you add --crlf to the curl call?
I was trying to figure out why email notices using AMTM settings wasn't working. After some research online, I discovered the Qmail mail transfer agent rejects it as bare LFs are against 822bis section 2.3 which requires a carriage return before the linefeed (LF).
Adding the -crlf in the curl call resolves the email send failure for those with hosts using qmail transfer agents.
Code:
$(/usr/sbin/curl --connect-timeout $EMAILTIMEOUT --max-time $EMAILTIMEOUT --url $PROTOCOL://$SMTP:$PORT \
--mail-from "$FROM_ADDRESS" --mail-rcpt "$TO_ADDRESS" \
--upload-file "$TMPEMAILFILE" \
--ssl-reqd \
--crlf \
--user "$USERNAME:$(/usr/sbin/openssl aes-256-cbc $emailPwEnc -d -in "$AMTM_EMAIL_DIR/emailpw.enc" -pass pass:ditbabot,isoi)" $SSL_FLAG 2>/dev/null) \