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

(-)a/C4/Letters.pm (-1 / +8 lines)
Lines 1051-1059 sub SendQueuedMessages { Link Here
1051
                my $sms_provider = Koha::SMS::Providers->find( $member->{'sms_provider_id'} );
1051
                my $sms_provider = Koha::SMS::Providers->find( $member->{'sms_provider_id'} );
1052
                unless ( $sms_provider ) {
1052
                unless ( $sms_provider ) {
1053
                    warn sprintf( "Patron %s has no sms provider id set!", $message->{'borrowernumber'} ) if $params->{'verbose'} or $debug;
1053
                    warn sprintf( "Patron %s has no sms provider id set!", $message->{'borrowernumber'} ) if $params->{'verbose'} or $debug;
1054
                    _set_message_status( { message_id => $message->{'message_id'}, status => 'failed' } );
1055
                    next MESSAGE;
1056
                }
1057
                $message->{to_address} = $message->{to_address} ? $message->{to_address} : $member->{'smsalertnumber'};
1058
                unless ( $message->{to_address} && $member->{'smsalertnumber'} ) {
1059
                    _set_message_status( { message_id => $message->{'message_id'}, status => 'failed' } );
1060
                    warn sprintf( "No smsalertnumber found for patron %s!", $message->{'borrowernumber'} ) if $params->{'verbose'} or $debug;
1054
                    next MESSAGE;
1061
                    next MESSAGE;
1055
                }
1062
                }
1056
                $message->{to_address} .= '@' . $sms_provider->domain();
1063
                $message->{to_address} .= '@' . $sms_provider->domain();
1064
                _update_message_to_address($message->{'message_id'},$message->{to_address});
1057
                _send_message_by_email( $message, $params->{'username'}, $params->{'password'}, $params->{'method'} );
1065
                _send_message_by_email( $message, $params->{'username'}, $params->{'password'}, $params->{'method'} );
1058
            } else {
1066
            } else {
1059
                _send_message_by_sms( $message );
1067
                _send_message_by_sms( $message );
1060
- 

Return to bug 18478