Trying to resolve mail encoding issues

pull/93/head
deajan 7 years ago
parent 69f8945806
commit 6031036ae1

@ -3,7 +3,7 @@
#### OFUNCTIONS MINI SUBSET ####
_OFUNCTIONS_VERSION=2.1-RC1+dev
_OFUNCTIONS_BUILD=2017020302
_OFUNCTIONS_BUILD=2017020501
#### _OFUNCTIONS_BOOTSTRAP SUBSET ####
_OFUNCTIONS_BOOTSTRAP=true
#### _OFUNCTIONS_BOOTSTRAP SUBSET END ####
@ -387,7 +387,11 @@ function SendAlert {
attachment=true
fi
if [ -e "$RUN_DIR/$PROGRAM._Logger.$SCRIPT_PID.$TSTAMP" ]; then
body="$MAIL_ALERT_MSG"$'\n\n'"$(cat $RUN_DIR/$PROGRAM._Logger.$SCRIPT_PID.$TSTAMP)"
if [ "$MAIL_BODY_CHARSET" != "" ] && type iconv > /dev/null 2>&1; then
body="$MAIL_ALERT_MSG"$'\n\n'"$(iconv -f UTF-8 -t $MAIL_BODY_CHARSET $RUN_DIR/$PROGRAM._Logger.$SCRIPT_PID.$TSTAMP)"
else
body="$MAIL_ALERT_MSG"$'\n\n'"$(cat $RUN_DIR/$PROGRAM._Logger.$SCRIPT_PID.$TSTAMP)"
fi
fi
if [ $ERROR_ALERT == true ]; then

@ -2,7 +2,7 @@
###### osync - Rsync based two way sync engine with fault tolerance
###### (C) 2013-2016 by Orsiris de Jong (www.netpower.fr)
###### osync v1.1x / v1.2x config file rev 2016121301
###### osync v1.1x / v1.2x config file rev 2017020501
## ---------- GENERAL OPTIONS
@ -163,6 +163,11 @@ DELTA_COPIES=yes
## on pfSense platform, smtp support needs to be configured in System > Advanced > Notifications
DESTINATION_MAILS="your@alert.tld"
## Optional change of mail body encoding (using iconv)
## By default, all mails are sent in UTF-8 format without header (because of maximum compatibility of all platforms)
## You may specify an optional encoding here (like "ISO-8859-1" or whatever iconv can handle)
MAIL_BODY_CHARSET=""
## Additional mail parameters needed for Android / Busybox / Cygwin / MSYS
## Android & Busybox use sendmail (and openssl if encryption is needed)
## MSYS & Cygwin Windows mail support relies on mailsend.exe from muquit, http://github.com/muquit/mailsend which needs to be in %PATH% environment variable

Loading…
Cancel
Save