diff --git i/src/mailman/email/message.py w/src/mailman/email/message.py index fd6a28144..693f8d2b7 100644 --- i/src/mailman/email/message.py +++ w/src/mailman/email/message.py @@ -49,6 +49,11 @@ class Message(email.message.Message): self.__dict__ = values def as_string(self): + try: + return email.message.Message.as_bytes(self).decode('utf-8') + except UnicodeEncodeError: + pass + # Work around for https://bugs.python.org/issue27321 and # https://bugs.python.org/issue32330. try: diff --git i/src/mailman/mta/connection.py w/src/mailman/mta/connection.py index ebcc19eb4..e69fe4c6a 100644 --- i/src/mailman/mta/connection.py +++ w/src/mailman/mta/connection.py @@ -127,10 +127,9 @@ class Connection: if self._connection is None: self._connect() self._login() - # smtplib.SMTP.sendmail requires the message string to be pure ascii. - # We have seen malformed messages with non-ascii unicodes, so ensure - # we have pure ascii. - msgtext = msgtext.encode('ascii', 'replace').decode('ascii') + # smtplib.SMTP.sendmail requires the message string to be + # bytes or an ASCII string. + msgtext = msgtext.encode('utf-8') try: log.debug('envsender: %s, recipients: %s, size(msgtext): %s', envsender, recipients, len(msgtext))