From d7c823c519a8158127626e259941c53ae7c7a26a Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Mon, 1 Nov 2021 11:46:10 -0400 Subject: ty: fix problems with smtplib and 8BITMIME There appears to be a bug in smtplib that doesn't properly support 8-bit content even when upstream SMTP gateway supports 8BITMIME (they all do, it's not 90s any more). Work around this by passing the message payload as bytes instead of string. Signed-off-by: Konstantin Ryabitsev --- b4/__init__.py | 1 + 1 file changed, 1 insertion(+) (limited to 'b4/__init__.py') diff --git a/b4/__init__.py b/b4/__init__.py index adbcf7d..14224a7 100644 --- a/b4/__init__.py +++ b/b4/__init__.py @@ -2505,6 +2505,7 @@ def get_smtp(identity: Optional[str] = None): raise smtplib.SMTPException('Invalid smtpport entry in %s' % sectname) encryption = sconfig.get('smtpencryption') + logger.info('Connecting to %s:%s', server, port) # We only authenticate if we have encryption if encryption: if encryption in ('tls', 'starttls'): -- cgit v1.2.3