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

(-)a/C4/Letters.pm (-3 / +12 lines)
Lines 929-939 sub _parseletter { Link Here
929
  my $success = EnqueueLetter( { letter => $letter, 
929
  my $success = EnqueueLetter( { letter => $letter, 
930
        borrowernumber => '12', message_transport_type => 'email' } )
930
        borrowernumber => '12', message_transport_type => 'email' } )
931
931
932
places a letter in the message_queue database table, which will
932
Places a letter in the message_queue database table, which will
933
eventually get processed (sent) by the process_message_queue.pl
933
eventually get processed (sent) by the process_message_queue.pl
934
cronjob when it calls SendQueuedMessages.
934
cronjob when it calls SendQueuedMessages.
935
935
936
return message_id on success
936
Return message_id on success
937
938
Parameters
939
* letter - required; A letter hashref as returned from GetPreparedLetter
940
* message_transport_type - required; One of the available mtts
941
* borrowernumber - optional if 'to_address' is passed; The borrowernumber of the patron we enqueuing the notice for
942
* to_address - optional if 'borrowernumber' is passed; The destination email address for the notice (defaults to patron->notice_email_address)
943
* from_address - optional; The from address for the notice, defaults to patron->library->from_email_address
944
* reply_address - optional; The reply address for the notice, defaults to patron->library->reply_to
937
945
938
=cut
946
=cut
939
947
Lines 1370-1375 sub _send_message_by_email { Link Here
1370
        $branch_returnpath = $library->branchreturnpath;
1378
        $branch_returnpath = $library->branchreturnpath;
1371
    }
1379
    }
1372
1380
1381
    # NOTE: Patron may not be defined above so branch_email may be undefined still 
1382
    # so we need to fallback to KohaAdminEmailAddress as a last resort.
1373
    my $from_address =
1383
    my $from_address =
1374
         $message->{'from_address'}
1384
         $message->{'from_address'}
1375
      || $branch_email
1385
      || $branch_email
1376
- 

Return to bug 28581