gpg-lacre/lacre
Piotr F. Mieszkowski 51863dda2b Use bytes instead of str to hold message bodies
smtplib.SMTP expects ASCII-only message bodies when message body is provided
as a 'str'.  If we pass a 'bytes', we need to choose encoding earlier and we
do this by calling 'as_bytes' on messages with SMTP policy, which takes care
of formatting the body properly.

As a result, ISO-8859-x messages are converted to Quoted Printable and UTF-8
messages are Base64-encoded.

Testing this behaviour is tricky, because we use the same SMTP client to send
test data.  For this reason, test code has become a bit ugly, but it does
exactly what we need.
2022-11-03 22:37:21 +01:00
..
__init__.py Move gpg-mailgate.py logic to lacre.mailgate module 2022-06-11 21:00:42 +02:00
config.py Simplify code, improve log entries, add comments 2022-10-22 11:23:17 +02:00
core.py Use bytes instead of str to hold message bodies 2022-11-03 22:37:21 +01:00
daemon.py Use bytes instead of str to hold message bodies 2022-11-03 22:37:21 +01:00
keyring.py Re-use the same Event Loop for each coroutine 2022-10-29 16:54:58 +02:00
mailop.py Use bytes instead of str to hold message bodies 2022-11-03 22:37:21 +01:00
text.py Add a test for message with PGP inline markers that's not encrypted 2022-10-22 21:29:59 +02:00