Fix attachment flag formatting in email sending logic for correct attachment handling

This commit is contained in:
Yaro Kasear 2025-04-16 14:44:26 -05:00
parent a989ddcff0
commit 7ff3703326

View file

@ -150,7 +150,7 @@ fi
if [ ${#ATTACHMENTS[@]} -eq 0 ]; then
echo "[!] No files to attach. Email not sent."
else
echo "$EMAIL_BODY" | mutt -s "$EMAIL_SUBJECT" "${ATTACHMENTS[@]/#/-a }" -- "$RECIPIENT"
echo "$EMAIL_BODY" | mutt -s "$EMAIL_SUBJECT" "${ATTACHMENTS[@]/#/ -a}" -- "$RECIPIENT"
fi
echo "[+] Email sent to $RECIPIENT with attachments: ${ATTACHMENTS[*]}"