[Koha-bugs] [Bug 28275] Cart in OPAC doesn't sent mails if surname or firstname contains diacritics

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jun 4 16:13:54 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28275

Filippos Kolovos <f.kolovos at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |f.kolovos at gmail.com

--- Comment #2 from Filippos Kolovos <f.kolovos at gmail.com> ---
Hello,

Upon further investigation, the problem does not seem to be solely with the
diacritics in the user's name, but with ANY character other than the ones
forming an email address in the user's email.

The purpose is to form a combination of the user's fullname and the email, in
the form John Doe <john.doe at test.com>, but it does not pass the
Email::Valid->addresses() method in Koha::Email, throwing a BadParameter
exception in line 112. I guess that this method is very strict in validating
the email address format

One quick workaround would be to change the line 62 in
/usr/share/koha/opac/cgi-bin/opac/opac-sendbasket.pl
from
my $email_replyto = $patron->firstname . " " . $patron->surname . "
<$user_email>";
to 
my $email_replyto = $user_email;

It was checked and it works.

Further work could include to first validate the email address and afterwards
to include the user's firstname and lastname along with the "<",">" characters
around the email.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list