auanasgheps / snapraid-aio-script

The definitive all-in-one SnapRAID script on Linux. Diff, sync, scrub are things of the past. Manage SnapRAID and much, much more!
GNU General Public License v3.0
241 stars 36 forks source link

Special characters sometimes not displayed correctly in email #122

Closed DonkeeeyKong closed 1 month ago

DonkeeeyKong commented 1 month ago

Describe the bug I recently changed the email provider. I have a script that runs as a custom hook that outputs some special characters (ä,, ö, ü), that were not displayed correctly in the mail after that. I believe the previous email provider made sure the email was reformatted to be displayed correctly which the current doesn't. The script sends the mail as text/html without specifying a charset which makes it use ISO-8859-1. If a mail is sent in debian without specifying a header it automatically uses plain/text and the charset of the system (in my case utf-8) – which formats the characters correctly. Imho, it would be better to use utf-8 for the script's email as well.

To Reproduce Send email that contains special characters. See if it's displayed correctly. Can be tried via: echo "üüüüü" | mailx -a 'Content-Type: text/html' -s "Test-Mail" root vs the correctly encoded: echo "üüüüü" | mailx -a 'Content-Type: text/html; charset=UTF-8' -s "Test-Mail" root

Expected behavior Email should be displayed correctly regardless of email provider or email program.

Please complete the following information:

DonkeeeyKong commented 1 month ago

This should be fixed by #123. My emails were always displayed correctly after this change.

auanasgheps commented 1 month ago

Merged the PR and closing this issue. Thanks for reporting and the PR!