email.policy.Policy.fold()

fold(name, value)

The email package calls this method with the name and value currently stored in the Message for a given header. The method should return a string that represents that header “folded” correctly (according to the policy settings) by composing the name with the value and inserting linesep characters at the appropriate places. See RFC 5322 for a discussion of the rules for folding email headers.

value may contain surrogateescaped binary data. There should be no surrogateescaped binary data in the string returned by the method.

doc_python
2016-10-07 17:32:55
Comments
Leave a Comment

Please login to continue.