SMTPHandler uses smtplib and when sending an email with this library, your process is blocked until it is sent correctly, not a single thread will be created.
If you do not want to block your process when sending emails, you will have to implement your own SMTPHandler and override the emit(self, record) method.
A less blocking handler is SysLogHandler , since it is usually a local connection in UDP, so the system does not wait for confirmation from the destination.
source share