Development #39934
envoi mail vs destinataires avec des accents
Statut:
Fermé
Priorité:
Normal
Assigné à:
-
Version cible:
-
Début:
17 février 2020
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Non
Description
Exception: type = '<class 'UnicodeEncodeError'>', value = ''ascii' codec can't encode character '\xe9' in position 10: ordinal not in range(128)' Stack trace (most recent call first): File "/usr/lib/python3.5/smtplib.py", line 351, in send 349 # should not be used, but 'data' needs to convert the string to 350 # binary itself anyway, so that's not a problem. > 351 s = s.encode(self.command_encoding) 352 try: 353 self.sock.sendall(s) locals: s = 'rcpt TO:<Cédric....@gmail.com>\r\n'
Fichiers
Révisions associées
Historique
Mis à jour par Frédéric Péters il y a environ 4 ans
- Fichier 0001-emails-add-support-for-unicode-local-parts-if-server.patch 0001-emails-add-support-for-unicode-local-parts-if-server.patch ajouté
- Statut changé de Nouveau à Solution proposée
- Patch proposed changé de Non à Oui
On ne peut pas exclure que ça fonctionne (https://tools.ietf.org/html/rfc6531.html).
(plutôt que dupliquer le code, le patch fait également passer par EmailToSend en cas de traitement synchrone)
Mis à jour par Thomas Noël il y a environ 4 ans
- Statut changé de Solution proposée à Solution validée
Pour enjoliver encore un peu, on pourrait remplacer le s.close()
final par un s.quit()
plus protocolaire (close n'est pas documentée, j'imagine que c'est plutôt une méthode prévue en interne only)
Mis à jour par Frédéric Péters il y a environ 4 ans
- Statut changé de Solution validée à Résolu (à déployer)
Poussé avec .quit()
commit b23c2a4c502f2a5ea375ccf81ac6da497c1659ea Author: Frédéric Péters <fpeters@entrouvert.com> Date: Mon Feb 17 12:44:28 2020 +0100 emails: add support for unicode local-parts (if server supports it) (#39934)
Mis à jour par Frédéric Péters il y a environ 4 ans
- Statut changé de Résolu (à déployer) à Solution déployée
emails: add support for unicode local-parts (if server supports it) (#39934)