Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMTP should reconnect when disconnected #439

Open
zeitderforschung opened this issue May 18, 2022 · 0 comments
Open

SMTP should reconnect when disconnected #439

zeitderforschung opened this issue May 18, 2022 · 0 comments
Labels
Milestone

Comments

@zeitderforschung
Copy link

Is your feature request related to a problem? Please describe.

After a while, the SMTP connection in the (g)mail provider is disconnected for some reason (network interrupted, etc). Any log message after that will no longer be transmitted by email.

Describe the solution you'd like

Log everything regardless of the connection status.

Describe alternatives you've considered

This is my workaround, do something similar. BTW you can easily simulate a disconnection with handler.provider.smtp_server.quit().

 if self.smtp_server and not callable(self.smtp_server):
      try:
          # send dummy request
          self.smtp_server.noop()
      except SMTPServerDisconnected:
          # force reconnect if disconnected
          self.smtp_server = None

Additional context

None.

@liiight liiight added the bug label Jul 12, 2022
@liiight liiight added this to the 1.3.4 milestone Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants