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

(-)a/C4/Letters.pm (-2 / +7 lines)
Lines 836-843 sub _send_message_by_email ($;$$$) { Link Here
836
    if ( my $bcc = C4::Context->preference('OverdueNoticeBcc') ) {
836
    if ( my $bcc = C4::Context->preference('OverdueNoticeBcc') ) {
837
       $sendmail_params{ Bcc } = $bcc;
837
       $sendmail_params{ Bcc } = $bcc;
838
    }
838
    }
839
    
840
839
840
    _update_message_to_address($message->{'message_id'},$to_address) unless $message->{to_address}; #if initial message address was empty, coming here means that a to address was found and queue should be updated
841
    if ( sendmail( %sendmail_params ) ) {
841
    if ( sendmail( %sendmail_params ) ) {
842
        _set_message_status( { message_id => $message->{'message_id'},
842
        _set_message_status( { message_id => $message->{'message_id'},
843
                status     => 'sent' } );
843
                status     => 'sent' } );
Lines 863-868 sub _send_message_by_sms ($) { Link Here
863
    return $success;
863
    return $success;
864
}
864
}
865
865
866
sub _update_message_to_address {
867
    my ($id, $to)= @_;
868
    my $dbh = C4::Context->dbh();
869
    $dbh->do('UPDATE message_queue SET to_address=? WHERE message_id=?',undef,($to,$id));
870
}
871
866
sub _set_message_status ($) {
872
sub _set_message_status ($) {
867
    my $params = shift or return undef;
873
    my $params = shift or return undef;
868
874
869
- 

Return to bug 6302