(self, msg)
| 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: |
no test coverage detected