...
 
Commits (3)
......@@ -7,6 +7,7 @@ from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import credentials
import pathlib
MY_ADDRESS = credentials.MY_ADDRESS
PASSWORD = credentials.PASSWORD
......@@ -39,8 +40,9 @@ def read_template(filename):
def send(script, additional_msg="", log_path=None):
names, emails = get_contacts('contacts.conf') # read contacts
message_template = read_template('message.conf')
mail_dir = str(pathlib.Path(__file__).parent.absolute())
names, emails = get_contacts(mail_dir + '/contacts.conf') # read contacts
message_template = read_template(mail_dir + '/message.conf')
# set up the SMTP server
s = smtplib.SMTP(host='smtp.fing.edu.uy', port=587)
......