MCPcopy
hub / github.com/django/django / _add_bodies

Method _add_bodies

django/core/mail/message.py:481–487  ·  view source on GitHub ↗
(self, msg)

Source from the content-addressed store, hash-verified

479 self.attach(path.name, content, mimetype)
480
481 def _add_bodies(self, msg):
482 if self.body or not self.attachments:
483 encoding = self.encoding or settings.DEFAULT_CHARSET
484 body = force_str(
485 self.body or "", encoding=encoding, errors="surrogateescape"
486 )
487 msg.set_content(body, subtype=self.content_subtype, charset=encoding)
488
489 def _add_attachments(self, msg):
490 if self.attachments:

Callers 2

messageMethod · 0.95
_add_bodiesMethod · 0.45

Calls 1

force_strFunction · 0.90

Tested by

no test coverage detected