Commits

Jason R. Coombs committed 432197d

Implement mail checker as a script in the package

  • Participants
  • Parent commits eba1c32

Comments (0)

Files changed (3)

Adams Row Tracker Mail Gateway.xml

Binary file modified.

adamsrow/tracker/mail_check.py

+import sys
+import importlib
+
+def check_mail(tracker_home):
+	# enable the trace util
+	importlib.import_module('win32traceutil')
+	gw = importlib.import_module('roundup.scripts.roundup_mailgw')
+
+	print("Checking mail...")
+
+	sys.argv[1:] = [
+		tracker_home,
+		"pops",
+		"tracker@adamsrowcondo.org:33eanFqm@pop.gmail.com",
+	]
+	gw.run()
+
+if __name__ == '__main__':
+	check_mail(r"C:\Inetpub\Adams Row Tracker")

notes.txt

-To configure the mail gateway, I had to create a Scheduled Task, which
-I exported as "Adams Row Tracker Mail Gateway.xml".
-
-Later, I created this script that the scheduler runs:
-"""
-import sys
-
-import win32traceutil
-from roundup.scripts.roundup_mailgw import run
-
-print("Checking mail...")
-
-sys.argv[1:] = [
-	r"C:\Inetpub\Adams Row Tracker",
-	"pops",
-	"tracker@adamsrowcondo.org:33eanFqm@pop.gmail.com",
-]
-run()
-"""