I am doing some experiments with the "Pipe to Program" filters, and I have to say, there is not much documentation on the internet besides this wiki page, and states the following:
Sends the message to an application of your choice. No return value is
expected. This feature can be used to create automatic Web postings from
email messages or to perform additional message post processing not
supported by Evolution.
So what I undertand from this is that the program will be called like.
echo "mail-contents" | /path/to/my/bash/script.sh
And I am trying to figure out what its actually piped though the script, so I wrote a script to actually try and find it out:
while IFS= read -r line; do
printf '%s\n' "$line" | tee -a /tmp/email.out
echo $var | tee -a /tmp/email-test.out
/usr/bin/env > /tmp/env.out
And the scipt reads multiline when invoked like so:
# echo "lol" | evolution-pipe-check.sh
and also appears on the files.
But on evolution the files gets created with an empty line, why I have no idea.