Bug 31522

Summary: Koha::Email does not like non-ASCII in name part of email address
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: Architecture, internals, and plumbingAssignee: Bugs List <koha-bugs>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: tomascohen
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Marcel de Rooy 2022-09-06 14:28:58 UTC
Trying to use address like 'Michèlle <ascii@email.com>' makes Koha::Email raise an exception.
This comes from Email::Valid and provides the following reason:
rfc822
Replacing the è with e resolves the check.

Note that this RFC was already obsoleted in ... 2001 !

Is this normal, major or ?
Comment 1 Marcel de Rooy 2022-09-06 14:29:29 UTC
Tomas: Please have a look
Comment 2 Marcel de Rooy 2022-09-06 14:31:11 UTC
See also opac/opac-sendbasket.pl:

    my $email_replyto = $patron->firstname . " " . $patron->surname . " <$user_email>";
Comment 3 Tomás Cohen Arazi 2022-09-06 14:32:58 UTC
We don't use Email::Valid anymore, this one being on of the reasons.
Comment 4 Marcel de Rooy 2022-09-06 14:36:25 UTC
(In reply to Tomás Cohen Arazi from comment #3)
> We don't use Email::Valid anymore, this one being on of the reasons.

Cool.
Normally I would have checked master but let me skip it one day :)
This was 20.11
Comment 5 Tomás Cohen Arazi 2022-09-06 14:38:14 UTC
I tried to make it backportable. But eventually lost track of things.
Comment 6 Marcel de Rooy 2022-09-06 14:39:23 UTC
Confirming that the problem is resolved under master. Closing