#!/bin/sh commandsFile="/tmp/neomutt-commands" markdownFile="/tmp/neomutt-markdown" htmlFile="/tmp/neomutt.html" cat - > "$markdownFile" echo -n "push " > "$commandsFile" pandoc -f markdown -t html5 --standalone "$markdownFile" > "$htmlFile" # Attach the html file echo -n "\"$htmlFile\"" >> "$commandsFile" # Set it as inline echo -n "" >> "$commandsFile" # Tell neomutt to delete it after sending echo -n "" >> "$commandsFile" # Select both the html and markdown files echo -n "" >> "$commandsFile" # Group the selected messages as alternatives echo -n "" >> "$commandsFile"