commit 26cc955b7b79afdbbbc7f73ac50b78899148b735
Author: David Sorber <david.sorber@gmail.com>
Date:   Sat Jan 22 10:01:48 2022 -0500

    Adding simple email test script to debug email-from-script issues.

diff --git a/software/misc/email_test.py b/software/misc/email_test.py
new file mode 100755
index 0000000..d2ac967
--- /dev/null
+++ b/software/misc/email_test.py
@@ -0,0 +1,44 @@
+#!/usr/bin/python3
+import datetime
+from email.mime.text import MIMEText
+from smtplib import SMTP_SSL
+import socket
+import subprocess
+import sys
+
+RELAY_EMAIL = 'dsorber.phalanx@gmail.com'
+RELAY_PASSWD = "You'reNotMySupervisor"
+TO_EMAIL = 'baranovich@gmail.com'
+
+SEP = '-' * 80
+
+# 20210122 - Note to self if you're having STMP authentication issues check:
+# https://stackabuse.com/how-to-send-emails-with-gmail-using-python/
+#
+def send_email(subject, msg_text): 
+    msg = MIMEText(msg_text, 'plain')
+    msg['Subject'] = subject
+    msg['To'] = TO_EMAIL
+    try:
+        conn = SMTP_SSL('smtp.gmail.com')
+        conn.set_debuglevel(True)
+        conn.login(RELAY_EMAIL, RELAY_PASSWD)
+        try:
+            conn.sendmail(RELAY_EMAIL, TO_EMAIL, msg.as_string())
+        finally:
+            conn.close()
+
+    except Exception as exc:
+        print('ERROR')
+        print(exec)
+        sys.exit("Mail failed: {}".format(exc))
+
+def main():
+    
+    print('Email Test Util\n')
+    
+    send_email('EMAIL TEST', str(datetime.datetime.now()))
+    
+    
+if __name__ == '__main__':
+    sys.exit(main())
