Message410917
Sorry, I think '<A@A.A.A A.A>' is not valid, as spaces are not allowed between words.
However I am not seeing the original unfolded source if there is an error, unless I am misunderstanding the API.
For example:
--- cut here ---
import email.header
import email.utils
import email.policy
def test(test):
msg_string = f"Message-id: {test}"
message = email.message_from_string(msg_string, policy=email.policy.default)
out = message['Message-id']
print(test)
print(out)
test('<A@A.A.A A.A>') # invalid
test('<A@A.A.AA.A>') # valid
--- cut here ---
This produces:
<A@A.A.A A.A>
<A@A.A.A> # truncated at error
<A@A.A.AA.A>
<A@A.A.AA.A>
i.e. the invalid input is truncated |
|
Date |
User |
Action |
Args |
2022-01-18 23:49:58 | bpoaugust | set | recipients:
+ bpoaugust, barry, eric.smith, r.david.murray |
2022-01-18 23:49:58 | bpoaugust | set | messageid: <1642549798.2.0.698616491121.issue46392@roundup.psfhosted.org> |
2022-01-18 23:49:58 | bpoaugust | link | issue46392 messages |
2022-01-18 23:49:58 | bpoaugust | create | |
|