fastapi-mail icon indicating copy to clipboard operation
fastapi-mail copied to clipboard

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

Open martincpt opened this issue 9 months ago • 0 comments

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!

martincpt avatar May 09 '24 12:05 martincpt