mailopenhtml.sh
· 493 B · Bash
Raw
#!/bin/sh
# Open HTML mails with your browser (xdg-open)
#
# Author: Dominic Reich <quick.hat4396@qtztsjosmprqmgtunjyf.com>
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}
1 | #!/bin/sh |
2 | # Open HTML mails with your browser (xdg-open) |
3 | # |
4 | # Author: Dominic Reich <quick.hat4396@qtztsjosmprqmgtunjyf.com> |
5 | |
6 | BROWSER=xdg-open |
7 | #BROWSER=firefox |
8 | #BROWSER=librewolf |
9 | #BROWSER=zen-browser |
10 | #BROWSER=thorium-browser |
11 | #BROWSER=chromium |
12 | |
13 | ID=$(echo $(date +%s) | sha1sum -z | awk '{ printf $1 }') |
14 | FILEPATH=/tmp |
15 | FILENAME=neomutt-${ID}.html |
16 | FILE=${FILEPATH}/${FILENAME} |
17 | |
18 | cat $* > ${FILE} |
19 | ${BROWSER} ${FILE} |
20 | |
21 | # this is much quicker than the browser could ever load the file... |
22 | #rm -f ${FILE} |
23 |