Files
DDNSupdater/test_report.py
2026-04-13 09:08:09 +01:00

24 lines
659 B
Python
Executable File

import smtplib
from email.mime.text import MIMEText
SMTP_SERVER = "smtp.office365.com"
SMTP_PORT = 587
EMAIL_ADDRESS = "ddnsupdater@outlook.com"
EMAIL_PASSWORD = "ltehpesmqnkjenah"
TO_EMAIL = "rafjaniak@outlook.com"
msg = MIMEText("This is a test email from DDNS updater.")
msg["Subject"] = "Test Email"
msg["From"] = EMAIL_ADDRESS
msg["To"] = TO_EMAIL
try:
with smtplib.SMTP(SMTP_SERVER, SMTP_PORT) as server:
server.ehlo()
server.starttls()
server.login(EMAIL_ADDRESS, EMAIL_PASSWORD)
server.send_message(msg)
print("✅ Email sent successfully")
except Exception as e:
print(f"❌ Failed to send email: {e}")