From ea5fa981360a5976e20c59db30afa1c092606c68 Mon Sep 17 00:00:00 2001 From: Pascal F Date: Fri, 24 May 2024 08:36:04 +0200 Subject: [PATCH] Fix typing --- django_mailbox/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/django_mailbox/models.py b/django_mailbox/models.py index 95a9fcc..0a5a3e9 100644 --- a/django_mailbox/models.py +++ b/django_mailbox/models.py @@ -662,7 +662,9 @@ def reply(self, message): EmailMessage(subject="pong", body="pongpong") ) """ - if not isinstance(message, EmailMessage): + from django.core.mail import EmailMessage as DjangoEmailMessage + + if not isinstance(message, DjangoEmailMessage): raise ValueError('Message must be an instance of email.Message') if not message.from_email: