first commit
This commit is contained in:
parent
ea264a41e7
commit
02c1806f8e
16
msg.py
16
msg.py
|
@ -1,7 +1,7 @@
|
|||
# emails
|
||||
|
||||
message_status = """\
|
||||
From: baasil@riseup.net
|
||||
From: {}
|
||||
To: {}
|
||||
Subject: Your Australian student visa application status has changed to \"{}\"\n\n
|
||||
|
||||
|
@ -9,18 +9,18 @@ https://online.immi.gov.au/lusc/login
|
|||
This is an automated message sent from a python script made by Baasil."""
|
||||
|
||||
message_new = """\
|
||||
From: baasil@riseup.net
|
||||
From: {}
|
||||
To: {}
|
||||
Subject: You have new message(s) in your australian visa application portal\n\n
|
||||
|
||||
{}\n
|
||||
{}\n\n
|
||||
https://online.immi.gov.au/lusc/login
|
||||
check portal to see full message, I won't do everything for you\n
|
||||
This is an automated message sent from a python script made by Baasil."""
|
||||
|
||||
message_final = """\
|
||||
From: baasil@riseup.net
|
||||
To:{}
|
||||
From: {}
|
||||
To: {}
|
||||
Subject: Your Australian visa has been {}\n\n
|
||||
|
||||
https://online.immi.gov.au/lusc/login
|
||||
|
@ -28,7 +28,7 @@ check portal for details\nthis message may have been sent in error\n
|
|||
this is an automated message sent from a python script made by Baasil."""
|
||||
|
||||
error_message = """\
|
||||
From: baasil@riseup.net
|
||||
From: {}
|
||||
To: {}
|
||||
Subject: visa_stat.py exited due to too many consecutive errors\n\n
|
||||
|
||||
|
@ -36,7 +36,7 @@ https://online.immi.gov.au/lusc/login - check what's up here
|
|||
this is an automated message"""
|
||||
|
||||
net_error_msg = """\
|
||||
From: baasil@riseup.net
|
||||
From: {}
|
||||
To: {}
|
||||
Subject: visa_stat.py too many consecutive net errors\n\n
|
||||
|
||||
|
@ -44,7 +44,7 @@ https://online.immi.gov.au/lusc/login - check what's up here
|
|||
this is an automated message"""
|
||||
|
||||
error_in_messages = """\
|
||||
From: baasil@riseup.net
|
||||
From: {}
|
||||
To:{}
|
||||
Subject: too many consecutive errors in fetching messages, from visa_stat.py\n\n
|
||||
|
||||
|
|
4
utils.py
4
utils.py
|
@ -4,13 +4,15 @@ from config import *
|
|||
|
||||
def notifier(receivers_list, msg, *format_args):
|
||||
"""sends mail to receivers_list with msg message formated with rmail and *format_args"""
|
||||
|
||||
for rmail in receivers_list:
|
||||
with smtplib.SMTP_SSL(IMAP_SERVER, PORT, context=CONTEXT) as server:
|
||||
server.login(CRED_MAIL.username, CRED_MAIL.password)
|
||||
server.sendmail(SENDER_EMAIL, rmail, msg.format(rmail, *format_args))
|
||||
server.sendmail(SENDER_EMAIL, rmail, msg.format(SENDER_EMAIL, rmail, *format_args))
|
||||
|
||||
def music(file):
|
||||
"""plays music from wav file"""
|
||||
|
||||
sa.WaveObject.from_wave_file(file).play()
|
||||
|
||||
def parse_date(full_message):
|
||||
|
|
|
@ -5,6 +5,7 @@ from random import randrange
|
|||
from os import _exit
|
||||
import threading
|
||||
from plyer import notification as toast
|
||||
from config import *
|
||||
from msg import *
|
||||
from utils import *
|
||||
|
||||
|
|
Loading…
Reference in a new issue