diff --git a/local/bin/spam b/local/bin/spam new file mode 100755 index 0000000..efb0304 --- /dev/null +++ b/local/bin/spam @@ -0,0 +1,15 @@ +#!/bin/sh + +mid="id:$1" +file="$(notmuch show "$mid" | sed -n '1s/.*filename:\([^ ]*\).*/\1/p')" +temp="$(mktemp)" + +cat > "$temp" < +HERE + +alot compose --sender felix.vanderjeugt@ugent.be \ + --template="$temp" \ + --subject spam \ + --to spam@ugent.be \ + --attach "$file"