Microsoft Office Solutions - Envoi de mail depuis Office 365 fonctionne en PHP mais pas avec Python
... / Envoi de mail depuis Offi...
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Frage

Envoi de mail depuis Office 365 fonctionne en PHP mais pas avec Python

Von
SORACEJ
Erstellungsdatum 2020-05-28 13:03:49 (edited on 2024-09-04 12:33:08) in Microsoft Office Solutions

Bonjour,

Je dispose d'un hébergement web sur laquelle est hébergée une application en PHP Symfony 4. Cette application envoie un certain nombre de mails depuis un smtp d'office 365.

L'envoi fonctionne parfaitement, mais j'ai récemment développé un script en Python que je souhaite mettre en cron. En utilisant les mêmes paramètres que mon application PHP, j'obtiens l'erreur suivante :

`OSError: [Errno 97] Address family not supported by protocol`

Je tiens à préciser qu'en local, le mail s'envoie sans problème, j'ai essayé d'envoyer un mail en utilisant le ssl0.ovh.net, je n'obtiens pas cette erreur mais une autre du type "535 authentication failed 5.7.1".

Ma configuration de mail (PHP et Python) :
`host: smtp.office365.com
port: 587
encryption: tls`

Quelqu'un aurait une solution à mon problème svp ?


1 Antwort ( Latest reply on 2020-05-29 06:56:13 Von
fritz2cat officiel (d'avant la migration)
)


[Errno 97] Address family not supported by protocol


Tu as cherché sur internet ? Il y a plein de cas similaires, par exemple
https://www.raspberrypi.org/forums/viewtopic.php?t=56373
et ça pourrait être lié à une tentative de connexion en IPv6...

Antworten sind derzeit für diese Frage deaktiviert.