sabuhish / fastapi-mail

Fastapi mail system sending mails(individual, bulk) attachments(individual, bulk)
https://sabuhish.github.io/fastapi-mail/
MIT License
673 stars 82 forks source link

How should I connect to the `email-dispatched` signal? #214

Open martincpt opened 3 months ago

martincpt commented 3 months ago

I noticed there is an email_dispatched blink signal object available in this package, which sends a signal every time an email is sent.

I'm trying to connect to this signal, but I'm just unable to receive anything whenever an email is sent. What am I missing here?

I have the following in my code:

from fastapi_mail.fastmail import email_dispatched

email_dispatched.connect(lambda msg: print(msg))

I also tried with the standard definition, but nothing gets through either.

Can anyone help with this?

I'd appreciate it!