summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsendmailadvanced.in23
1 files changed, 21 insertions, 2 deletions
diff --git a/sendmailadvanced.in b/sendmailadvanced.in
index db638fa..5c512bf 100755
--- a/sendmailadvanced.in
+++ b/sendmailadvanced.in
@@ -174,6 +174,8 @@ fi
(
IFS=''
adressatenString=""
+ contentType='Content-Type: text/plain; charset=utf-8'
+ contentTE='Content-Transfer-Encoding: 7bit'
unset adressaten
declare -A adressaten
adressatenSammeln=false
@@ -194,7 +196,17 @@ fi
${adressatenSammeln} && adressatenString="${adressatenString}${s}"
if ${encrypt}
then
- if [ "${zeile:0:14}" == "Content-Type: " ] || [ "${zeile:0:14}" == "MIME-Version: " ]
+ if [ "${zeile:0:14}" == "Content-Type: " ]
+ then
+ contentType="${zeile}"
+ continue
+ fi
+ if [ "${zeile:0:27}" == "Content-Transfer-Encoding: " ]
+ then
+ contentTE="${zeile}"
+ continue
+ fi
+ if [ "${zeile:0:14}" == "MIME-Version: " ]
then
continue
fi
@@ -218,7 +230,14 @@ fi
) | \
if ${encrypt}
then
- gpg -e -a -s $(gpgAdressaten | sed 's| $||')
+ (
+ echo "${contentType}"
+ echo "${contentTE}"
+ echo ''
+ cat
+ echo ''
+ ) | \
+ gpg -e -a -s $(gpgAdressaten | sed 's| $||')
else
cat
fi