|
Lines 1381-1400
sub _send_message_by_email {
Link Here
|
| 1381 |
}); |
1381 |
}); |
| 1382 |
return; |
1382 |
return; |
| 1383 |
}; |
1383 |
}; |
| 1384 |
my $email = Koha::Email->create( |
1384 |
my $email = try { |
| 1385 |
{ |
1385 |
Koha::Email->create( |
| 1386 |
to => $to_address, |
1386 |
{ |
| 1387 |
( |
1387 |
to => $to_address, |
| 1388 |
C4::Context->preference('NoticeBcc') |
1388 |
( |
| 1389 |
? ( bcc => C4::Context->preference('NoticeBcc') ) |
1389 |
C4::Context->preference('NoticeBcc') |
| 1390 |
: () |
1390 |
? ( bcc => C4::Context->preference('NoticeBcc') ) |
| 1391 |
), |
1391 |
: () |
| 1392 |
from => $from_address, |
1392 |
), |
| 1393 |
reply_to => $message->{'reply_address'} || $branch_replyto, |
1393 |
from => $from_address, |
| 1394 |
sender => $branch_returnpath, |
1394 |
reply_to => $message->{'reply_address'} || $branch_replyto, |
| 1395 |
subject => "" . $message->{subject} |
1395 |
sender => $branch_returnpath, |
| 1396 |
} |
1396 |
subject => "" . $message->{subject} |
| 1397 |
); |
1397 |
} |
|
|
1398 |
); |
| 1399 |
} |
| 1400 |
catch { |
| 1401 |
my $exception = $_; |
| 1402 |
_set_message_status( |
| 1403 |
{ |
| 1404 |
message_id => $message->{'message_id'}, |
| 1405 |
status => 'failed', |
| 1406 |
delivery_note => $exception->message, |
| 1407 |
error_code => 'INVALID_EMAIL' |
| 1408 |
} |
| 1409 |
); |
| 1410 |
return 0; |
| 1411 |
}; |
| 1412 |
return unless $email; |
| 1398 |
|
1413 |
|
| 1399 |
if ( $is_html ) { |
1414 |
if ( $is_html ) { |
| 1400 |
$email->html_body( |
1415 |
$email->html_body( |
| 1401 |
- |
|
|