Bug 12532: (QA follow-up) Undo changes to Koha::Email

The changes here aren't required (Email::Address already deals with
lists of addresses internally)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Martin Renvoize 2023-05-10 18:11:52 +01:00 committed by Tomas Cohen Arazi
parent dc629ea7b5
commit 7517fb6235
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -118,14 +118,10 @@ sub create {
$args->{to} = $params->{to};
}
my @emails = split(',', $args->{to});
foreach my $email (@emails) {
$email =~ s/ //g;
Koha::Exceptions::BadParameter->throw(
error => "Invalid 'to' parameter: ".$email,
parameter => 'to'
) unless Koha::Email->is_valid($email);
}
Koha::Exceptions::BadParameter->throw(
error => "Invalid 'to' parameter: " . $args->{to},
parameter => 'to'
) unless Koha::Email->is_valid( $args->{to} );
my $addresses = {};
$addresses->{reply_to} = $params->{reply_to};