X-Git-Url: https://git.tld-linux.org/?p=tld-builder.git;a=blobdiff_plain;f=TLD_Builder%2Fmailer.py;h=764bdf416d8845ad3e15fcb99a77339817f8a0e4;hp=f76a8bda289957ad214e462951fb4a844f3ec463;hb=a68953c88fba6e657febf9cb06273f44288f759c;hpb=4c1b8295857d2b8d2b2975c4030d61c3f1b61bcb diff --git a/TLD_Builder/mailer.py b/TLD_Builder/mailer.py index f76a8bd..764bdf4 100644 --- a/TLD_Builder/mailer.py +++ b/TLD_Builder/mailer.py @@ -5,7 +5,7 @@ import os import sys from io import StringIO from config import config -import util +import shutil import log def recode(s): @@ -58,7 +58,7 @@ class Message: self.body.write("\n\n[...]\n\n") line += 1 else: - util.sendfile(open(log), self.body) + shutil.copyfileobj(open(log), self.body) def set_std_headers(self): self.headers["Date"] = time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()) @@ -73,7 +73,7 @@ class Message: f.write("%s: %s\n" % (k, v)) f.write("\n") self.body.seek(0) - util.sendfile(self.body, f) + shutil.copyfileobj(self.body, f) def send(self): if not os.path.exists("/usr/lib/sendmail"):