Hi,

Le 03/05/2016 23:51, Ola Lundqvist a écrit :
Hi again

No sorry, replace the <TAB> with nothing or space. That should do the trick.

Replacing "<TAB>" with nothing is not enough.
Each XHEADER has to be quoted as well.
Mail command with cli options is then eval.

Here is a quick and not so pretty patch, please review.

Tested on debian 8.2.

Cheers,
Geoff
106,107c106,107
< 	    IFS=`printf '\t'`
<             i=1
---
> 	    IFS=$(printf '\t')
> 	    i=1
110,112c110,112
< 		XHEADERS="$XHEADERS  <TAB> -a  <TAB>   $VAL"
< 		i=$(( $i + 1 ))
< 		eval "VAL=\${XHEADER$i}"
---
> 			XHEADERS="$XHEADERS -a \"$VAL\""
> 			i=$(( $i + 1 ))
> 			eval "VAL=\${XHEADER$i}"
114,115d113
< 	    #
<             mail $XHEADERS -s "$SUBJECT" "$MAILTO" < "$MAIL"
116a115,116
> 	    #
> 	    eval mail $XHEADERS -s \"$SUBJECT\" \"$MAILTO\" < "$MAIL"

Reply via email to