failing back to default sender if org has no email
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 1 Sep 2006 04:42:11 +0000 (04:42 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 1 Sep 2006 04:42:11 +0000 (04:42 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5824 dcc99617-32d9-48b4-a31d-7c20da2025e4

Evergreen/src/support-scripts/eg_gen_overdue.pl

index 494aba9..b26c66b 100755 (executable)
@@ -391,9 +391,10 @@ sub send_email {
 
        my $r = ($range eq '7day') ? 7 : 14;
 
+       $org_email ||= $mail_sender;
+
        $tmpl =~ s/\${EMAIL_RECIPIENT}/$pemail/;
-       $tmpl =~ s/\${EMAIL_SENDER}/$mail_sender/;
-       #$tmpl =~ s/\${EMAIL_REPLY_TO}/$org_email/o;
+       $tmpl =~ s/\${EMAIL_REPLY_TO}/$org_email/o;
        $tmpl =~ s/\${EMAIL_REPLY_TO}/$mail_sender/;
    $tmpl =~ s/\${EMAIL_HEADERS}//;