init commit

This commit is contained in:
2026-03-04 09:52:43 +02:00
commit 88ced77b23
8 changed files with 331 additions and 0 deletions

17
helpers/send_email.py Normal file
View File

@@ -0,0 +1,17 @@
import smtplib
# --- HELPER TRIMITE EMAIL (GMAIL) ---
def send_gmail(to_email, subject, body):
# Folosește App Password-ul tău de la Google aici
user = "macamete.robert@gmail.com"
pw = "advx yqlv jkaa czvr"
msg = f"Subject: {subject}\nContent-Type: text/html\n\n{body}"
try:
server = smtplib.SMTP_SSL('smtp.gmail.com', 465)
server.login(user, pw)
server.sendmail(user, to_email, msg)
server.quit()
return True
except Exception as e:
print(f"Eroare mail: {e}")
return False