Function
email.Encoders.encode_7or8bit

Signature

encode_7or8bit(msg)

Documentation String

Set the Content-Transfer-Encoding header to 7bit or 8bit.