Skip to content

Commit

Permalink
updated libs (#218)
Browse files Browse the repository at this point in the history
* updated libs

* fix linter

* fix linter

* fix linter

* fix linter

* relasing 1.2.6

* relasing 1.2.6
  • Loading branch information
sabuhish authored Nov 23, 2024
1 parent 969ea5c commit e4ffaa1
Show file tree
Hide file tree
Showing 5 changed files with 746 additions and 624 deletions.
2 changes: 1 addition & 1 deletion fastapi_mail/fastmail.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from contextlib import contextmanager
from email.utils import formataddr
from email.message import EmailMessage, Message
from email.utils import formataddr
from typing import Any, Dict, Optional, Union

import blinker
Expand Down
9 changes: 2 additions & 7 deletions fastapi_mail/msg.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.utils import formatdate, make_msgid
from typing import Any, Optional, Union
from typing import Any, Union

from .schemas import MessageType, MultipartSubtypeEnum

Expand Down Expand Up @@ -107,9 +107,7 @@ def attach_alternative(self, message: MIMEMultipart) -> MIMEMultipart:
message.attach(tmpmsg)
return message

async def _message(
self, sender: Optional[str] = None
) -> Union[EmailMessage, Message]:
async def _message(self, sender: str) -> Union[EmailMessage, Message]:
"""
Creates the email message
"""
Expand Down Expand Up @@ -153,6 +151,3 @@ async def _message(
self.message.add_header(header_name, header_content)

return self.message

async def as_string(self) -> Union[EmailMessage, Message]:
return await self._message()
Loading

0 comments on commit e4ffaa1

Please sign in to comment.