initial upload

This commit is contained in:
2026-10-05 14:32:30 +02:00
parent 510c5e3757
commit 2e22270bda
7 changed files with 286 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
#!/usr/bin/env python3
import smtplib
import ssl
# Fabrication du corps du email_passwordMessage
sender = "sasdumas@entreprise-dumas.com"
receiver = "phuoc@caotek.fr"
message = """\
Subject: Envoi d'un message en SSL
Voici le contenu du message. Phuoc"""
# Create a secure SSL context
context = ssl.create_default_context()
smtp_server = "gatewayxl.alinto.net"
smtp_port = 465 # For SSL
smtp_user = "smtpsasdumas@entreprise-dumas.com"
smtp_pass = "S@sdumas69"
# Try to log in to server and send email
try:
server = smtplib.SMTP_SSL(smtp_server, smtp_port, context=context)
server.login(smtp_user, smtp_pass)
# envoyer l'email
server.sendmail(sender, receiver, message)
print("sendmail -> OK")
except Exception as e:
# Print any error messages to stdout
print(e)
finally:
server.quit()