Skip to content Skip to sidebar Skip to footer

Mysterious Characters At The End Of E-mail, Received With Socket In Python

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, an

Solution 1:

As you would have seen if you looked up the SMTP protocol definition, a DATA section of a message transfer ends with <CRLF>.<CRLF>.

Solution 2:

These are simply newline characters. In GMail they'll be processed and "displayed" so you don't see them. But they are still part of the email text message so it makes sense that get_payload() returns them.

Post a Comment for "Mysterious Characters At The End Of E-mail, Received With Socket In Python"