For names which are encoded as Quoted-Printable, decode those using
qprint(1).
info=$(cat | grep "^From:\|^Date:" | tr '\n' ':')
[[ "$info" =~ (From: )([^:]*) ]]
-participant="${BASH_REMATCH[2]}"
+match="${BASH_REMATCH[2]}"
+if [[ ${match:0:1} == "=" ]]; then
+ name=$(echo ${match% <*} | sed 's/^=?.*?\(.*\)?=$/\1/' | qprint -d)
+ email="<${match#* <}"
+ participant="$name $email"
+else
+ participant="$match"
+fi
[[ "$info" =~ (Date: )([^:]*) ]]
date=$(date -I -d "${BASH_REMATCH[2]}")