Coverage for kwai/core/mail/mailer.py: 100%
4 statements
« prev ^ index » next coverage.py v7.3.0, created at 2023-09-05 17:55 +0000
« prev ^ index » next coverage.py v7.3.0, created at 2023-09-05 17:55 +0000
1"""Module that defines an interface for a mail service."""
2from abc import ABC, abstractmethod
4from .message import Message
7class MailerException(Exception):
8 """Exception raised from a Mailer."""
11class Mailer(ABC):
12 """Interface for a mail service."""
14 @abstractmethod
15 def send(self, message: Message):
16 """Send the message."""
17 raise NotImplementedError