I am not sure if this is the right forum to ask, but I give it a try.
A device is sending an E-Mail to my code in which I am trying to receive the email via a socket in python, and to decode the E-Mail with Messsage.get_payload()
calls. However. I always have a \n.\n
at the end of the message.
If the same device send the same message to a genuine email client (e.g. gmail), I get the correct original message without the \n.\n
.
I would like to know what it is with this closing set of special characters in SMTP/E-Mail handling/sending, and how to encode it away.