pyceo/ceo_common/interfaces/IMailService.py

26 lines
756 B
Python
Raw Normal View History

2021-08-22 01:44:41 -04:00
from typing import Dict, List
2021-07-23 20:08:22 -04:00
from zope.interface import Interface
from .IUser import IUser
class IMailService(Interface):
"""An interface to send email messages."""
def send(_from: str, to: str, headers: Dict[str, str], content: str):
"""Send a message with the given headers and content."""
2021-08-23 19:36:49 -04:00
def send_welcome_message_to(user: IUser, password: str):
"""
Send a welcome message to the new member, including their temporary
password.
"""
2021-08-22 01:44:41 -04:00
def announce_new_user(user: IUser, operations: List[str]):
"""
Announce to the ceo mailing list that the new user was created.
`operations` is a list of the operations which were performed
during the transaction.
"""