diff options
| -rw-r--r-- | README.md | 2 | ||||
| -rwxr-xr-x | bin/mailsync | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -4,7 +4,7 @@ https://muttwizard.com/ Get this great stuff without effort: -- A full-featured and autoconfigured email client on the terminal wibuiltth neomutt +- A full-featured and autoconfigured email client on the terminal built with neomutt - Mail stored offline enabling the ability to: * view and write emails while you're away from the internet diff --git a/bin/mailsync b/bin/mailsync index 3a681f0..7114836 100755 --- a/bin/mailsync +++ b/bin/mailsync @@ -74,7 +74,7 @@ syncandnotify() { [ -z "$MAILSYNC_MUTE" ] && for file in $new; do # Extract and decode subject and sender from mail. - subject=$(awk '/^Subject: / && ++n == 1,/^.*: / && ++i == 2' "$file" | head -n-1 | + subject=$(awk '/^Subject: / && ++n == 1,/^.*: / && ++i == 2' "$file" | sed '$d' | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | sed 's/^Subject: //' | tr -d '\n\t') from="$(sed -n "/^From:/ s|From: *|| p" "$file" | |
