def render_to_message(self, extra_context=None, **kwargs):
if extra_context is None:<EOL><INDENT>extra_context = {}<EOL><DEDENT>kwargs.setdefault('<STR_LIT>', {}).update(self.headers)<EOL>context = self.get_context_data(**extra_context)<EOL>return self.message_class(<EOL>subject=self.render_subject(context),<EOL>body=self.render_body(context),<EOL>**kwargs)<EOL>
Renders and returns an unsent message with the provided context.

Any extra keyword arguments passed will be passed through as keyword
arguments to the message constructor.

:param extra_context: Any additional context to use when rendering the
    templated content.
:type extra_context: :class:`dict`
:returns: A message instance.
:rtype: :attr:`.message_class`