View | Details | Raw Unified | Return to bug 33360
Collapse All | Expand All

(-)a/C4/Letters.pm (-1 / +7 lines)
Lines 34-39 use Koha::SMS::Providers; Link Here
34
use Koha::Email;
34
use Koha::Email;
35
use Koha::Notice::Messages;
35
use Koha::Notice::Messages;
36
use Koha::Notice::Templates;
36
use Koha::Notice::Templates;
37
use Koha::Notice::Util;
37
use Koha::DateUtils qw( dt_from_string output_pref );
38
use Koha::DateUtils qw( dt_from_string output_pref );
38
use Koha::Auth::TwoFactorAuth;
39
use Koha::Auth::TwoFactorAuth;
39
use Koha::Patrons;
40
use Koha::Patrons;
Lines 65-70 BEGIN { Link Here
65
    );
66
    );
66
}
67
}
67
68
69
our $domain_limits = {};
70
68
=head1 NAME
71
=head1 NAME
69
72
70
C4::Letters - Give functions for Letters management
73
C4::Letters - Give functions for Letters management
Lines 984-989 sub SendQueuedMessages { Link Here
984
        'where'                  => $params->{'where'} // q{},
987
        'where'                  => $params->{'where'} // q{},
985
    };
988
    };
986
    my $unsent_messages = _get_unsent_messages( $which_unsent_messages );
989
    my $unsent_messages = _get_unsent_messages( $which_unsent_messages );
990
    $domain_limits = Koha::Notice::Util->load_domain_limits; # (re)initialize per run
987
    MESSAGE: foreach my $message ( @$unsent_messages ) {
991
    MESSAGE: foreach my $message ( @$unsent_messages ) {
988
        my $message_object = Koha::Notice::Messages->find( $message->{message_id} );
992
        my $message_object = Koha::Notice::Messages->find( $message->{message_id} );
989
        # If this fails the database is unwritable and we won't manage to send a message that continues to be marked 'pending'
993
        # If this fails the database is unwritable and we won't manage to send a message that continues to be marked 'pending'
Lines 1332-1337 sub _send_message_by_email { Link Here
1332
        }
1336
        }
1333
    }
1337
    }
1334
1338
1339
    # Skip this message if we exceed domain limits in this run
1340
    return if Koha::Notice::Util->exceeds_limit({ to => $to_address, limits => $domain_limits });
1341
1335
    my $subject = $message->{'subject'};
1342
    my $subject = $message->{'subject'};
1336
1343
1337
    my $content = $message->{'content'};
1344
    my $content = $message->{'content'};
1338
- 

Return to bug 33360