From: erickson Date: Thu, 21 Aug 2008 20:55:11 +0000 (+0000) Subject: added support for using the org-unit setting for FROM address X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=864e447ccf94882a4e1e91b78e4da0805d1aac4f;p=Evergreen.git added support for using the org-unit setting for FROM address git-svn-id: svn://svn.open-ils.org/ILS/trunk@10408 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/support-scripts/generate_circ_notices.pl b/Open-ILS/src/support-scripts/generate_circ_notices.pl index b430286b78..935e97bb0c 100755 --- a/Open-ILS/src/support-scripts/generate_circ_notices.pl +++ b/Open-ILS/src/support-scripts/generate_circ_notices.pl @@ -240,12 +240,20 @@ sub generate_notice { notifications => $type => 'sender_address') || $settings->config_value(notifications => 'sender_address'); + # see if there is a configured bounce address for this org unit. + # if so, use that as the sender + if(my $set = $e->search_actor_org_unit_setting( + {name => 'org.bounced_emails', org_unit => $circ_list->[0]->circ_lib->id} )->[0]) { + my $bemail = OpenSRF::Utils::JSON->JSON2perl($set->value); + $sender = $bemail if $bemail; + } + + my $context = { circ_list => $circ_list, get_bib_attr => \&get_bib_attr, parse_due_date => \&parse_due_date, # let the templates decide date format smtp_sender => $sender, - smtp_repley => $sender, # XXX notice => $notice, };