Initial files push for DDNS Updater
This commit is contained in:
23
test_report.py
Executable file
23
test_report.py
Executable file
@@ -0,0 +1,23 @@
|
||||
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}")
|
||||
Reference in New Issue
Block a user