The Palos Publishing Company

Follow Us On The X Platform @PalosPublishing
Categories We Write About

Make a text message scheduler

Here’s a simple text message scheduler built in Python using schedule and smtplib (for emails or SMS via email-to-text gateways). This version is terminal-based and can be expanded into a GUI or web version later.


✅ Prerequisites

  1. Install dependencies:

bash
pip install schedule
  1. Know your carrier’s SMS gateway. Common ones:

    • AT&T: number@txt.att.net

    • Verizon: number@vtext.com

    • T-Mobile: number@tmomail.net


💡 Example: Python Text Message Scheduler

python
import schedule import time import smtplib from email.mime.text import MIMEText # Email credentials EMAIL_ADDRESS = "your_email@example.com" EMAIL_PASSWORD = "your_email_password" # SMS Gateway address (e.g., 1234567890@vtext.com for Verizon) TO_NUMBER = "1234567890@vtext.com" # Function to send message def send_text(message): msg = MIMEText(message) msg["From"] = EMAIL_ADDRESS msg["To"] = TO_NUMBER msg["Subject"] = "" with smtplib.SMTP_SSL("smtp.gmail.com", 465) as server: server.login(EMAIL_ADDRESS, EMAIL_PASSWORD) server.sendmail(EMAIL_ADDRESS, TO_NUMBER, msg.as_string()) print(f"Message sent: {message}") # Schedule text def schedule_text(message, time_str): schedule.every().day.at(time_str).do(send_text, message=message) print(f"Scheduled '{message}' at {time_str}") # Example use schedule_text("Hello! This is your daily reminder.", "14:30") # Run scheduler while True: schedule.run_pending() time.sleep(1)

🔐 Notes:

  • If you’re using Gmail, you may need to enable App Passwords or less secure app access.

  • To support multiple messages at different times, call schedule_text() multiple times with different times/messages.

  • This script must stay running (e.g., on a server, Raspberry Pi, or background process).

Would you like a GUI or web-based version of this next?

Share this Page your favorite way: Click any app below to share.

Enter your email below to join The Palos Publishing Company Email List

We respect your email privacy

Categories We Write About