#!/bin/sh
# Open HTML mails with your browser (xdg-open)
#
# Author: Dominic Reich
BROWSER=xdg-open
#BROWSER=firefox
#BROWSER=librewolf
#BROWSER=zen-browser
#BROWSER=thorium-browser
#BROWSER=chromium
ID=$(echo $(date +%s) | sha1sum -z | awk '{ printf $1 }')
FILEPATH=/tmp
FILENAME=neomutt-${ID}.html
FILE=${FILEPATH}/${FILENAME}
cat $* > ${FILE}
${BROWSER} ${FILE}
# this is much quicker than the browser could ever load the file...
#rm -f ${FILE}