New submission from Michael Salsone:

I am looking to use the get_body() method from email.message.EmailMessage, but 
I am unable to create an object of this type. I am attempting to create an 
object of this from message_from_string (as well as some of the other 
email.parser methods). But it won't allow me to change the class to 
email.message.EmailMessage. I've read through the source for some this code, 
but I don't see where you thread the needle here, is it even possible?

Example:
from email.message import EmailMessage
email.message_from_string(self.original_message, _class=EmailMessage)

----------
components: email
messages: 296378
nosy: Michael Salsone, barry, r.david.murray
priority: normal
severity: normal
status: open
title: EmailMessage Object Creation
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30706>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to