Added all new blank files and have first working copy of app and app2

This commit is contained in:
Joe Steele
2024-03-01 14:22:24 -05:00
parent e64605da9b
commit 5567c28e37
9 changed files with 333 additions and 57 deletions
+29
View File
@@ -0,0 +1,29 @@
import smtplib
import sys
CARRIERS = {
"att": "@mms.att.net",
"tmobile": "@tmomail.net",
"verizon": "@vtext.com",
"sprint": "@messaging.sprintpcs.com"
}
EMAIL = "EMAIL"
PASSWORD = "PASSWORD"
def send_message(phone_number, carrier, message):
recipient = phone_number + CARRIERS[carrier]
auth = (EMAIL, PASSWORD)
server = smtplib.SMTP("smtp.gmail.com", 587)
server.starttls()
server.login(auth[0], auth[1])
server.sendmail(auth[0], recipient, message)
if __name__ == "__main__":
if len(sys.argv) < 4:
print(f"Usage: python3 {sys.argv[0]} <PHONE_NUMBER> <CARRIER> <MESSAGE>")
sys.exit(0)
phone_number = sys.argv[1]
carrier = sys.argv[2]
message = sys.argv[3]
send_message(phone_number, carrier, message)