Lines 118-131
sub create {
Link Here
|
118 |
$args->{to} = $params->{to}; |
118 |
$args->{to} = $params->{to}; |
119 |
} |
119 |
} |
120 |
|
120 |
|
121 |
my @emails = split(',', $args->{to}); |
121 |
Koha::Exceptions::BadParameter->throw( |
122 |
foreach my $email (@emails) { |
122 |
error => "Invalid 'to' parameter: " . $args->{to}, |
123 |
$email =~ s/ //g; |
123 |
parameter => 'to' |
124 |
Koha::Exceptions::BadParameter->throw( |
124 |
) unless Koha::Email->is_valid( $args->{to} ); |
125 |
error => "Invalid 'to' parameter: ".$email, |
|
|
126 |
parameter => 'to' |
127 |
) unless Koha::Email->is_valid($email); |
128 |
} |
129 |
|
125 |
|
130 |
my $addresses = {}; |
126 |
my $addresses = {}; |
131 |
$addresses->{reply_to} = $params->{reply_to}; |
127 |
$addresses->{reply_to} = $params->{reply_to}; |
132 |
- |
|
|