Lines 204-215
Notices" section of the staff interface to Koha.
Link Here
|
204 |
=head2 Outgoing emails |
204 |
=head2 Outgoing emails |
205 |
|
205 |
|
206 |
Typically, messages are prepared for each patron with overdue |
206 |
Typically, messages are prepared for each patron with overdue |
207 |
items. Messages for whom there is no email address on file are |
207 |
items. These emails are staged in the outgoing message queue, as are messages |
208 |
collected and sent as attachments in a single email to each library |
|
|
209 |
administrator, or if that is not set, then to the email address in the |
210 |
C<KohaAdminEmailAddress> system preference. |
211 |
|
212 |
These emails are staged in the outgoing message queue, as are messages |
213 |
produced by other features of Koha. This message queue must be |
208 |
produced by other features of Koha. This message queue must be |
214 |
processed regularly by the |
209 |
processed regularly by the |
215 |
F<misc/cronjobs/process_message_queue.pl> program. |
210 |
F<misc/cronjobs/process_message_queue.pl> program. |
Lines 262-271
administrator email address.
Link Here
|
262 |
C<overdue_notices.pl> - In this most basic usage, with no command line |
257 |
C<overdue_notices.pl> - In this most basic usage, with no command line |
263 |
arguments, all libraries are processed individually, and notices are |
258 |
arguments, all libraries are processed individually, and notices are |
264 |
prepared for all patrons with overdue items for whom we have email |
259 |
prepared for all patrons with overdue items for whom we have email |
265 |
addresses. Messages for those patrons for whom we have no email |
260 |
addresses. |
266 |
address are sent in a single attachment to the library administrator's |
|
|
267 |
email address, or to the address in the KohaAdminEmailAddress system |
268 |
preference. |
269 |
|
261 |
|
270 |
C<overdue_notices.pl -n -csv /tmp/overdues.csv> - sends no email and |
262 |
C<overdue_notices.pl -n -csv /tmp/overdues.csv> - sends no email and |
271 |
populates F</tmp/overdues.csv> with information about all overdue |
263 |
populates F</tmp/overdues.csv> with information about all overdue |
Lines 802-826
END_SQL
Link Here
|
802 |
$content = ""; |
794 |
$content = ""; |
803 |
} |
795 |
} |
804 |
$content .= join( "\n", @output_chunks ); |
796 |
$content .= join( "\n", @output_chunks ); |
805 |
|
|
|
806 |
my $attachment = { |
807 |
filename => defined $csvfilename ? 'attachment.csv' : 'attachment.txt', |
808 |
type => 'text/plain', |
809 |
content => $content, |
810 |
}; |
811 |
|
812 |
my $letter = { |
813 |
title => 'Overdue Notices', |
814 |
content => 'These messages were not sent directly to the patrons.', |
815 |
}; |
816 |
C4::Letters::EnqueueLetter( |
817 |
{ letter => $letter, |
818 |
borrowernumber => undef, |
819 |
message_transport_type => 'email', |
820 |
attachments => [$attachment], |
821 |
to_address => $admin_email_address, |
822 |
} |
823 |
) unless $test_mode; |
824 |
} |
797 |
} |
825 |
|
798 |
|
826 |
} |
799 |
} |
827 |
- |
|
|