summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@redhat.com>2011-08-18 14:52:47 +0200
committerRex Dieter <rdieter@fedoraproject.org>2011-08-18 08:07:53 -0500
commit31c9f61c608433bd38211bd6c68baac393afa983 (patch)
treefa46bca3caee14c83ff7771e9c7998239333588a
parent11bdb3111dc77147fa323b99532820fcd7b537df (diff)
xdg-email: Enclose addresses in double quotes for Thunderbird
Looks like this is the way how to pass addresses with comma in the name. However, Thunderbird still doesn't understand quoted attachments. Thanks to Ladicek for inspiration...
-rw-r--r--scripts/xdg-email.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/xdg-email.in b/scripts/xdg-email.in
index 3930f38..e67abb4 100644
--- a/scripts/xdg-email.in
+++ b/scripts/xdg-email.in
@@ -43,9 +43,9 @@ run_thunderbird()
fi
MAILTO=$(echo "$MAILTO" | sed 's/&/\n/g')
- TO=$(echo -e $(echo "$MAILTO" | grep '^to=' | sed 's/^to=//;s/%\(..\)/\\x\1/g' | awk '{ printf "%s,",$0 }'))
- CC=$(echo -e $(echo "$MAILTO" | grep '^cc=' | sed 's/^cc=//;s/%\(..\)/\\x\1/g' | awk '{ printf "%s,",$0 }'))
- BCC=$(echo -e $(echo "$MAILTO" | grep '^bcc=' | sed 's/^bcc=//;s/%\(..\)/\\x\1/g' | awk '{ printf "%s,",$0 }'))
+ TO=$(echo -e $(echo "$MAILTO" | grep '^to=' | sed 's/^to=//;s/%\(..\)/\\x\1/g' | awk '{ printf "\"%s\",",$0 }'))
+ CC=$(echo -e $(echo "$MAILTO" | grep '^cc=' | sed 's/^cc=//;s/%\(..\)/\\x\1/g' | awk '{ printf "\"%s\",",$0 }'))
+ BCC=$(echo -e $(echo "$MAILTO" | grep '^bcc=' | sed 's/^bcc=//;s/%\(..\)/\\x\1/g' | awk '{ printf "\"%s\",",$0 }'))
SUBJECT=$(echo "$MAILTO" | grep '^subject=' | tail -n 1)
BODY=$(echo "$MAILTO" | grep '^body=' | tail -n 1)
ATTACH=$(echo -e $(echo "$MAILTO" | grep '^attach=' | sed 's/^attach=//;s/%\(..\)/\\x\1/g' | awk '{ printf "%s,",$0 }' | sed 's/,$//'))