Skip to content

Commit

Permalink
now pulling eoy email addresses from yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsher committed Mar 16, 2023
1 parent 5c4b6b0 commit 299e828
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/devicekiosk.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ def checkForErrors(self):
@Slot(None, result=int)
def getKioskMode(self):
return self.config["kiosk_mode"]

@Slot(None, result=str)
def getEOYEmailAddresses(self):
return self.config["eoy_return_addresses"]

@Slot()
def startOver(self):
Expand Down Expand Up @@ -295,7 +299,7 @@ def emailEOYReturnFiles(self, returnAddress):
msg.add_attachment(content, maintype='application', subtype='txt', filename=str(file))
# email.add_attachment(content, maintype='application', subtype='pdf', filename='example.pdf')
msg['From'] = self.config["smtp_user"]
msg['To'] = "asher@tolland.k12.ct.us, " + returnAddress
msg['To'] = self.config["eoy_return_addresses"] + ", " + returnAddress
# Send the message via Gmail SMTP server
s = smtplib.SMTP("smtp.gmail.com", 587)
s.ehlo()
Expand Down
2 changes: 1 addition & 1 deletion src/qml/EOYFinish.qml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Item {
Layout.fillWidth: true
Layout.fillHeight: true

text: "Enter an email address to receive the return files.\nEmail will also be sent to Candace de Loureiro.\nFiles will be backed up this computer in the event something goes wrong."
text: "Enter an email address to receive the return files.\nEmail will also be sent to: " + ui.getEOYEmailAddresses() + "\nFiles will be backed up this computer in the event something goes wrong."
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
wrapMode: Text.WordWrap
Expand Down

0 comments on commit 299e828

Please sign in to comment.