From 88e17ea6842477c479b77ab1ecf727472bb2093d 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/django_mailbox/models.py b/django_mailbox/models.py index 95a9fcc..86108ea 100644 --- a/django_mailbox/models.py +++ b/django_mailbox/models.py @@ -662,8 +662,10 @@ def reply(self, message): EmailMessage(subject="pong", body="pongpong") ) """ - if not isinstance(message, EmailMessage): - raise ValueError('Message must be an instance of email.Message') + from django.core.mail import EmailMessage as DjangoEmailMessage + + if not isinstance(message, DjangoEmailMessage): + raise ValueError('Message must be an instance of django.core.mail.EmailMessage') if not message.from_email: if self.mailbox.from_email: