Compare commits
2 Commits
4d0538479a
...
e17d03b376
Author | SHA1 | Date |
---|---|---|
Fred Boniface | e17d03b376 | |
Fred Boniface | 35faea7ecd |
|
@ -53,6 +53,7 @@ def sendMail(msg_body :str):
|
||||||
message['Subject'] = "OwlBoard - dbmanager Logs"
|
message['Subject'] = "OwlBoard - dbmanager Logs"
|
||||||
filename = "cif_data"
|
filename = "cif_data"
|
||||||
message.attach(MIMEText(msg_body, "plain"))
|
message.attach(MIMEText(msg_body, "plain"))
|
||||||
|
if os.path.exists(filename):
|
||||||
with open(filename, "rb") as attachment:
|
with open(filename, "rb") as attachment:
|
||||||
part = MIMEBase("application", "octet-stream")
|
part = MIMEBase("application", "octet-stream")
|
||||||
part.set_payload(attachment.read())
|
part.set_payload(attachment.read())
|
||||||
|
|
Loading…
Reference in New Issue