Ver Fonte

Workaround to send email in plain text

Email appears as "noname" attachment in Gmail accounts (and probably others but I did not test on):

Content-Type: application/octet-stream
Content-Transfer-Encoding: base64

So use cat -v as a workaround

See: http://ask.fclose.com/305/plain-pipelined-content-application-octet-stream-attachment

Also recommended to apply this fix to all other server scripts for consistency reasons.
yuuki89 há 12 anos atrás
pai
commit
afb3f89d8a
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      NaturalSelection2/ns2server

+ 1 - 1
NaturalSelection2/ns2server

@@ -359,7 +359,7 @@ if [ ! -z "${gamelogdir}" ]; then
 	echo -e "\n\nServer log\n====================\n" >> "${emaillog}"
 	tail "${gamelogdir}"/*|grep -v "==>"|sed '/^$/d'|tail -25 >> "${emaillog}"
 fi
-mail -s "${subject}" ${email} < "${emaillog}"
+cat -v "${emaillog}" | mail -s "${subject}" ${email}
 fn_printinfo "Sent email notification to ${email}"
 sleep 1
 echo -en "\n"