Bonjour,
je rencontre un problème avec l'envoi de mail sous python.
voila le code :
EMAIL_HOST = 'SSL0.OVH.NET'
EMAIL_PORT = '465'
EMAIL_HOST_USER = 'user@mondomaine.fr'
EMAIL_HOST_PASSWORD = 'monpasswordquivabien'
try:
print("Connection au server : " + EMAIL_HOST + ":" + EMAIL_PORT)
server = smtplib.SMTP_SSL(EMAIL_HOST, EMAIL_PORT)
server.set_debuglevel(1)
print("Authentification")
server.login(EMAIL_HOST_USER, EMAIL_HOST_PASSWORD)
print("Envoi du message")
server.sendmail(EMAIL_HOST_USER,['destinataire1@hotmail.com'], "Sujet", "Message Test")
server.quit()
print("Envoyé !")
except :
print("Error")
et voila ce que j'ai en sorti :
Connection au server : SSL0.OVH.NET:465
Authentification
17:59:59.507320 send: 'ehlo TLS-GITELR101.cutting-edge.fr\r\n'
17:59:59.537249 reply: b'250-OVH SMTP PROXY Hello\r\n'
17:59:59.538247 reply: b'250-SIZE 104857600\r\n'
17:59:59.539243 reply: b'250-ENHANCEDSTATUSCODES\r\n'
17:59:59.539243 reply: b'250-AUTH LOGIN PLAIN\r\n'
17:59:59.543270 reply: b'250-AUTH=LOGIN PLAIN\r\n'
17:59:59.544230 reply: b'250 8BITMIME\r\n'
17:59:59.544230 reply: retcode (250); Msg: b'OVH SMTP PROXY Hello\nSIZE 104857600\nENHANCEDSTATUSCODES\nAUTH LOGIN PLAIN\nAUTH=LOGIN PLAIN\n8BITMIME'
17:59:59.545230 send: 'AUTH PLAIN AGluZm9An3JnaWUtcm9tYZlaZS5vzsBWeGN2Ym8hMTIqFVU2Nzg=\r\n'
17:59:59.873610 reply: b'235 2.7.0 Authentication successful\r\n'
17:59:59.874313 reply: retcode (235); Msg: b'2.7.0 Authentication successful'
Envoi du message
17:59:59.879460 send: 'mail FROM: size=3 T e s t\r\n'
17:59:59.908431 reply: b'555 5.5.4 Unsupported option: T\r\n'
17:59:59.908431 reply: retcode (555); Msg: b'5.5.4 Unsupported option: T'
17:59:59.909436 send: 'rset\r\n'
18:00:24.940172 reply: b'250 2.0.0 Ok\r\n'
18:00:24.940172 reply: retcode (250); Msg: b'2.0.0 Ok'
Error
Aucun mail n'arrive dans la boite du destinataire.
Merci d'avance.
Certificats SSL - Envoie mail Python SMTP SSL
Related questions
- Impossible de mettre en place certificat ssl
67183
05.12.2016 14:02
- Ssl0.ovh.net : impossible de vérifier l'identité serveur
60193
17.05.2019 13:38
- SSL actif mais site web non sécurisé
58346
20.05.2018 14:33
- Problème SSL/multisite "Une erreur est survenue lors de la modification du ou des domai
45816
17.02.2020 09:04
- Certificat SSL et VPS
44778
01.02.2017 11:56
- OVH devrait rapidement trouver un nouveau moyen de gérer les certificats SSL
37083
06.12.2016 08:45
- Redirection 301 et SSL
36587
10.09.2017 09:16
- Certificats SSL quantique QRNG - La mise à jour de nos Certificats SSL sera-t-elle mise à jour automatiquement ?
34197
29.10.2025 08:39
- Impossible de regénérer certificat SSL
31839
20.09.2017 18:55
- Smtp ssl0.ovh.net = Problème d'envoi avec Orange Pro
27055
28.03.2019 07:52