PyDocs

Nav

Internet Data Handling

Message.set_param

  • Message.set_param(param, value, header='Content-Type', requote=True, charset=None, language='', replace=False)
Set a parameter in the Content-Type header.

If the parameter already exists in the header, its value will be
replaced with the new value.

If header is Content-Type and has not yet been defined for this
message, it will be set to "text/plain" and the new parameter and
value will be appended as per RFC 2045.

An alternate header can be specified in the header argument, and all
parameters will be quoted as necessary unless requote is False.

If charset is specified, the parameter will be encoded according to RFC
2231.  Optional language specifies the RFC 2231 language, defaulting
to the empty string.  Both charset and language should be strings.
Changed in 3.4
  • 3.4: replace keyword was added.
0 Examples
No examples for email.message/Message.set_param.
See Also
No see-alsos for email.message/Message.set_param
0 Notes
No notes for Message.set_param