Skip to content

Instantly share code, notes, and snippets.

@odony

odony/example.py Secret

Created August 6, 2020 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save odony/0323eab303dad2077c1277076ecc3733 to your computer and use it in GitHub Desktop.
Save odony/0323eab303dad2077c1277076ecc3733 to your computer and use it in GitHub Desktop.
invalid rfc2047 folding example
Python 3.8.2 (default, Jul 16 2020, 14:00:26)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import email.message
>>> import email.policy
>>> msg = email.message.EmailMessage(policy=email.policy.SMTP)
>>> msg['Message-Id'] = '<929227342217024.1596730490.324691772460938-example-30661-some.reference@test-123.example.com>'
>>> msg['In-Reply-To'] = '<92922734221723.1596730568.324691772460444-another-30661-parent.reference@test-123.example.com>'
>>> print(msg.as_string())
Message-Id: <929227342217024.1596730490.324691772460938-example-30661-some.reference@test-123.example.com>
In-Reply-To: =?utf-8?q?=3C92922734221723=2E1596730568=2E324691772460444-anot?=
=?utf-8?q?her-30661-parent=2Ereference=40test-123=2Eexample=2Ecom=3E?=
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment