|
|
|
@ -1,3 +1,4 @@
|
|
|
|
|
|
|
|
import logging
|
|
|
|
from typing import Optional
|
|
|
|
from typing import Optional
|
|
|
|
|
|
|
|
|
|
|
|
import resend
|
|
|
|
import resend
|
|
|
|
@ -42,6 +43,9 @@ class Mail:
|
|
|
|
)
|
|
|
|
)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
raise ValueError('Unsupported mail type {}'.format(app.config.get('MAIL_TYPE')))
|
|
|
|
raise ValueError('Unsupported mail type {}'.format(app.config.get('MAIL_TYPE')))
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
logging.warning('MAIL_TYPE is not set')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def send(self, to: str, subject: str, html: str, from_: Optional[str] = None):
|
|
|
|
def send(self, to: str, subject: str, html: str, from_: Optional[str] = None):
|
|
|
|
if not self._client:
|
|
|
|
if not self._client:
|
|
|
|
|