Przeglądaj źródła

[Fix] Retry on Authentication error by Gmail, if emails are pulled from/pushed to server too frequently (#2090)

* [Fix] Authentication error is raised by Gmail, if emails are pulled from/pushed to server too frequently

* [Fix] Minor Fix
version-14
Shreyas Patil 8 lat temu
committed by Rushabh Mehta
rodzic
commit
4e4f5b2d53
1 zmienionych plików z 2 dodań i 5 usunięć
  1. +2
    -5
      frappe/email/smtp.py

+ 2
- 5
frappe/email/smtp.py Wyświetl plik

@@ -34,16 +34,14 @@ def send(email, append_to=None, retry=1):
except smtplib.SMTPRecipientsRefused:
frappe.msgprint(_("Invalid recipient address"), title='Email Failed')
raise
except smtplib.SMTPServerDisconnected:
except (smtplib.SMTPServerDisconnected, smtplib.SMTPAuthenticationError):
if not retry:
raise
else:
retry = retry - 1
_send(retry)

_send(retry)


_send(retry)

def get_outgoing_email_account(raise_exception_not_set=True, append_to=None):
"""Returns outgoing email account based on `append_to` or the default
@@ -207,4 +205,3 @@ class SMTPServer:
except smtplib.SMTPException:
frappe.msgprint(_('Unable to send emails at this time'))
raise


Ładowanie…
Anuluj
Zapisz