
import smtplib, ssl
from email.mime.text import MIMEText

sender = "noreply@tecpanther.com"
receiver = "randomdevloper@gmail.com"
password = "kwjyhneeamixujub"  # Gmail App Password

msg = MIMEText("Test mail from Python")
msg["Subject"] = "SMTP SSL Test"
msg["From"] = sender
msg["To"] = receiver

# Use default secure context (no overrides)
context = ssl.create_default_context()

try:
    with smtplib.SMTP_SSL("host.randomsoftsolution.in", 465, context=context) as server:
        server.login(sender, password)
        server.sendmail(sender, receiver, msg.as_string())
    print("✅ Mail sent successfully")
except Exception as e:
    print("❌ Error:", e)
