Skip to content
Snippets Groups Projects
Commit 9a54278e authored by Thibault Delavallée's avatar Thibault Delavallée
Browse files

[FIX] mail: limit reply-to name part

Python library currently holds a limitation when we use a formatted email
that is longer than 78 characters (e.g. "Long Company Name With Long Record
Name <email@domain.com>"). Python folds address if is longer than 78 chars
and a bad management of quotes breaks the reply-to. Even if anything should
technically be ok with the RFC python seems to incorrectly handle it (please
refer to [1] for more details and discussions).

Until this is finally sorted out we decided to avoid issues by shortening
reply-to. To avoid that issue when formataddr would return more than 78 chars
we return a simplified name/email to try to stay under 78 chars. If not
possible we return only the email and skip the formataddr which causes the
issue in python. We do not use hacks like crop the name part as encoding and
quoting would be error prone.

Task-2602862
OPW-2733513

[1] See https://bugs.python.org/issue44637



closes odoo/odoo#88912

X-original-commit: 5353ce3b
Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
parent 0802d4c6
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment