- if ( $mail_on_error ) {
- my $subject = "Batch import errors"; #?
- my $body = "Import from gateway ".$gateway->label."\n".$error_text;
- send_email(
- to => $mail_on_error,
- from => $conf->invoice_from_full(),
- subject => $subject,
- body => $body,
- );
+ if ( $errors_not_fatal ) {
+ my $message = "Import from gateway ".$gateway->label." errors: ".$error_text;
+ my $log = FS::Log->new('FS::pay_batch::import_from_gateway');
+ $log->error($message);