I added my Country locale (pl_PL) to shell in Open Tomato based router Asus and QNAP NAS. Originally only en_US and en_EN locale where available. Now it is possible to use it for example in vim-full editor, installed from Entware-ng. So now both on router and NAS, locale looks like this:
LANG=pl_PL.UTF-8
LC_CTYPE="pl_PL.UTF-8"
LC_NUMERIC="pl_PL.UTF-8"
LC_TIME="pl_PL.UTF-8"
LC_COLLATE="pl_PL.UTF-8"
LC_MONETARY="pl_PL.UTF-8"
LC_MESSAGES="pl_PL.UTF-8"
LC_PAPER="pl_PL.UTF-8"
LC_NAME="pl_PL.UTF-8"
LC_ADDRESS="pl_PL.UTF-8"
LC_TELEPHONE="pl_PL.UTF-8"
LC_MEASUREMENT="pl_PL.UTF-8"
LC_IDENTIFICATION="pl_PL.UTF-8"
LC_ALL=pl_PL.UTF-8
I send emails from router and NAS using msmtp command like this:
/bin/echo -e "Subject: Mail z routera ASUS\r\n\r\n<text with Polish characters>" |/opt/bin/msmtp --debug --from=default -t my_user@gmail.com,my_user@other.domain
Such emails are sending via gmail account, used as mail relay.
Below content of /opt/etc/msmtprc file:
defaults
tls on
tls_starttls on
tls_trust_file /opt/etc/certs/ca-bundle.crt
account default
host smtp.gmail.com
port 587
auth on
user my_account@gmail.com
password xxxxxxxx
from my_account@gmail.com
#logfile /opt/msmtp.log
The codepage for my language is Latin-8859-2.
The results are as follows.
in iPad mail client, Polish characters are display properly both for Gmail account and for other.domain account
in Linux Thunderbird Gmail account, Polish characters are display properly
- the same Thunderbird but other.domain account, strange symbols instead Polish characters
- mail read via Web page for other.domain, strange symbols instead Polish characters
All other sources emails are display properly on all platforms.
Probably I have to add something to config file or to msmtp command, to tell clients about codepage it have to use. I call to other.domain admin but they dont know why Polish character are display not properly in they own system. Shame... I dont know what to do. Any help?