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
|
||||
|
||||
try:
|
||||
start = time.time()
|
||||
if POSTFIX_SUBMISSION_TLS:
|
||||
smtp_port = 587
|
||||
else:
|
||||
|
@ -1306,6 +1307,8 @@ def sl_sendmail(
|
|||
if POSTFIX_SUBMISSION_TLS:
|
||||
smtp.starttls()
|
||||
|
||||
LOG.d("getting a smtp connection takes seconds %s", time.time() - start)
|
||||
|
||||
# smtp.send_message has UnicodeEncodeError
|
||||
# encode message raw directly instead
|
||||
LOG.d(
|
||||
|
|
Loading…
Reference in New Issue