Skip to content

Commit

Permalink
add some doc
Browse files Browse the repository at this point in the history
  • Loading branch information
hgrf committed Oct 22, 2023
1 parent 119acb4 commit a413678
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion app/emailing.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,19 @@
from .settings.forms import EmailSettings


def send_mail(to, subject, **kwargs):
def send_mail(to: list[str], subject: str, **kwargs) -> None:
"""
Send a mail using the current app configuration.
Examples::
>>> send_mail(["john.doe@gmail.com"], "Hello", body="Hello, John!")
Arguments:
to -- List of recipients.
subject -- Subject of the email.
**kwargs -- Additional arguments to be passed to flask_mail.Mail.send_message.
"""
# load email settings and update app config dynamically
with open("data/mailconfig.json") as f:
mailconfig = json.load(f)
Expand Down

0 comments on commit a413678

Please sign in to comment.