mirror of
https://github.com/simple-login/app.git
synced 2024-09-30 05:31:30 +02:00
log how much time to get a smtp connection
This commit is contained in:
parent
c2e95f0853
commit
b3469ba9d4
@ -1297,6 +1297,7 @@ def sl_sendmail(
|
|||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
start = time.time()
|
||||||
if POSTFIX_SUBMISSION_TLS:
|
if POSTFIX_SUBMISSION_TLS:
|
||||||
smtp_port = 587
|
smtp_port = 587
|
||||||
else:
|
else:
|
||||||
@ -1306,6 +1307,8 @@ def sl_sendmail(
|
|||||||
if POSTFIX_SUBMISSION_TLS:
|
if POSTFIX_SUBMISSION_TLS:
|
||||||
smtp.starttls()
|
smtp.starttls()
|
||||||
|
|
||||||
|
LOG.d("getting a smtp connection takes seconds %s", time.time() - start)
|
||||||
|
|
||||||
# smtp.send_message has UnicodeEncodeError
|
# smtp.send_message has UnicodeEncodeError
|
||||||
# encode message raw directly instead
|
# encode message raw directly instead
|
||||||
LOG.d(
|
LOG.d(
|
||||||
|
Loading…
Reference in New Issue
Block a user