mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Lazy loading of smtplib to reduce memory footprint a bit
This commit is contained in:
parent
9fe7c43aef
commit
0f2e9ab1d6
2 changed files with 2 additions and 2 deletions
|
@ -27,7 +27,6 @@ import sys
|
|||
import shutil
|
||||
import pwd
|
||||
import grp
|
||||
import smtplib
|
||||
import subprocess
|
||||
import glob
|
||||
|
||||
|
@ -467,6 +466,7 @@ Subject: %s
|
|||
%s
|
||||
""" % (from_, to_, subject_, text)
|
||||
|
||||
import smtplib
|
||||
smtp = smtplib.SMTP("localhost")
|
||||
smtp.sendmail(from_, [to_], message)
|
||||
smtp.quit()
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
import re
|
||||
import os
|
||||
import time
|
||||
import smtplib
|
||||
|
||||
from moulinette import m18n, msettings
|
||||
from moulinette.utils import log
|
||||
|
@ -583,6 +582,7 @@ Subject: %s
|
|||
%s
|
||||
""" % (from_, to_, subject_, disclaimer, content)
|
||||
|
||||
import smtplib
|
||||
smtp = smtplib.SMTP("localhost")
|
||||
smtp.sendmail(from_, [to_], message)
|
||||
smtp.quit()
|
||||
|
|
Loading…
Add table
Reference in a new issue