Hi,

mutt can adjust the charset based on the input. But it seems that
EmailMessage from python can not do this automatically. How does mutt
choose the charset automatically based on the content? Thanks.

https://docs.python.org/3/library/email.message.html

$ mutt -F temp.muttrc [email protected] <<< a
Date: Thu, 4 Feb 2021 08:35:21 -0600
From: My name <[email protected]>
To: [email protected]
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

a
$ mutt -F temp.muttrc [email protected] <<< α
Date: Thu, 4 Feb 2021 08:31:35 -0600
From: My name <[email protected]>
To: [email protected]
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

α
$ cat temp.muttrc
set realname='My name'
set [email protected]
set hostname = gmail.com
set sendmail=/tmp/mycat.sh
$ cat /tmp/mycat.sh
#!/usr/bin/env bash
# vim: set noexpandtab tabstop=2:

cat

-- 
Regards,
Peng

Reply via email to