--- /dev/null
+10 day overdue:
+
+
+[%- USE date -%]
+[%- user = target.0.usr -%]
+To: [%- params.recipient_email || user.email %]
+From: [%- params.sender_email || default_sender %]
+Subject: Overdue Notification
+
+Dear [% user.first_given_name %] [% user.family_name %],
+
+Our records indicate the following items are 10 days or more overdue:
+
+[% FOR circ IN target %]
+ Title: [% circ.target_copy.call_number.record.simple_record.title %]
+ Barcode: [% circ.target_copy.barcode %]
+ Due: [% date.format(helpers.format_date(circ.due_date), '%m-%d-%Y') %]
+ Total Owed For Transaction: [% circ.billable_transaction.summary.total_owed %]
+ Checkout Library: [% circ.circ_lib.name %]
+[% END %]
+Please return the above items to avoid additional fines.
+
+Please log in to your account at http://gapines.org/login or contact your library for more information:
+
+[% lib.name %]
+[% lib.mailing_address.street1 %] [% lib.mailing_address.street2 %]
+[% lib.mailing_address.city %], [% lib.mailing_address.state %]
+[% lib.mailing_address.post_code %]
+[% lib.phone %]
+
+Please do not respond to this email. This notice was sent from an address that cannot accept incoming mail.
+
+30 day overdue:
+
+[%- USE date -%]
+[%- user = target.0.usr -%]
+To: [%- params.recipient_email || user.email %]
+From: [%- params.sender_email || default_sender %]
+Subject: Overdue Notification
+
+Dear [% user.first_given_name %] [% user.family_name %],
+
+Our records indicate the following items are 30 days or more overdue:
+
+[% FOR circ IN target %]
+ Title: [% circ.target_copy.call_number.record.simple_record.title %]
+ Barcode: [% circ.target_copy.barcode %]
+ Due: [% date.format(helpers.format_date(circ.due_date), '%m-%d-%Y') %]
+ Total Owed For Transaction: [% circ.billable_transaction.summary.total_owed %]
+ Checkout Library: [% circ.circ_lib.name %]
+[% END %]
+Please return the above items to avoid additional fines.
+
+Please log in to your account at http://gapines.org/login or contact your library for more information:
+
+[% lib.name %]
+[% lib.mailing_address.street1 %] [% lib.mailing_address.street2 %]
+[% lib.mailing_address.city %], [% lib.mailing_address.state %]
+[% lib.mailing_address.post_code %]
+[% lib.phone %]
+
+Please do not respond to this email. This notice was sent from an address that cannot accept incoming mail.
+
+
+30-day account expiration notice:
+
+
+[%- USE date -%]
+[%- user = target -%]
+[%- lib = target.home_ou -%]
+To: [%- params.recipient_email || user.email %]
+From: [%- helpers.get_org_setting(target.home_ou.id, 'org.bounced_emails') || lib.email || params.sender_email || default_sender %]
+Reply-To: [%- helpers.get_org_setting(target.home_ou.id, 'org.bounced_emails') || lib.email || params.sender_email || default_sender %]
+Subject: Courtesy Notice - Library Account Expiration in 30 days
+Auto-Submitted: auto-generated
+
+Dear [% user.first_given_name %] [% user.family_name %],
+
+Our records indicate your library account is due to expire in 30 days. Please visit your local library with your picture ID and proof of address to renew your account in order to avoid a disruption in library service. Any outstanding fines or fees must be paid in order to renew your account.
+
+Sincerely,
+[% lib.name %]
+
+Please contact your library for more information:
+
+[% lib.name %]
+[%- SET addr = lib.mailing_address -%]
+[%- IF !addr -%] [%- SET addr = lib.billing_address -%] [%- END %]
+[% addr.street1 %] [% addr.street2 %]
+[% addr.city %], [% addr.state %]
+[% addr.post_code %]
+[% lib.phone %]
+
+Please do not respond to this email. This notice was sent from an address that cannot accept incoming mail.
+
+
+Long-Overdue notice:
+
+
+[%- USE date -%]
+[%- user = target.0.usr -%]
+To: [%- params.recipient_email || user.email %]
+From: [%- params.sender_email || default_sender %]
+Subject: Overdue Items Marked Long Overdue
+
+Dear [% user.first_given_name %] [% user.family_name %],
+
+The following items are 6 months or more overdue:
+
+[% FOR circ IN target %]
+ [%- copy_details = helpers.get_copy_bib_basics(circ.target_copy.id) -%]
+ Title: [% copy_details.title %], by [% copy_details.author %]
+ Call Number: [% circ.target_copy.call_number.label %]
+ Barcode: [% circ.target_copy.barcode %]
+ Due: [% date.format(helpers.format_date(circ.due_date), '%m-%d-%Y') %]
+ Total Owed For Transaction: [% circ.billable_transaction.summary.balance_owed %]
+ Checkout Library: [% circ.circ_lib.name %]
+
+[% END %]
+
+Your account has been charged item cost and a non-refundable processing fee for each item.
+
+Please log in to your account at http://gapines.org/login or contact your library for more information:
+
+[% lib.name %]
+[% lib.mailing_address.street1 %] [% lib.mailing_address.street2 %]
+[% lib.mailing_address.city %], [% lib.mailing_address.state %]
+[% lib.mailing_address.post_code %]
+[% lib.phone %]
+
+Please do not respond to this email. This notice was sent from an address that cannot accept incoming mail.
+
+
+Hold ready for pickup email:
+
+[%- USE date -%]
+[%- user = target.0.usr -%]
+[%- lib = target.0.pickup_lib -%]
+To: [%- params.recipient_email || user.email %]
+From: [%- helpers.get_org_setting(target.0.pickup_lib.id, 'org.bounced_emails') || lib.email || params.sender_email || default_sender %]
+Subject: Hold Available Notification
+
+Dear [% user.first_given_name %] [% user.family_name %],
+
+The item(s) you requested are available for pickup at your library:
+
+[% FOR hold IN target %]
+[%- copy_details = helpers.get_copy_bib_basics(hold.current_copy.id) -%]
+ Title: [% helpers.escape_xml(copy_details.title) %]
+ Author: [% helpers.escape_xml(copy_details.author) %]
+ Call Number: [% hold.current_copy.call_number.label %]
+ Barcode: [% hold.current_copy.barcode %]
+ Pickup Library: [% hold.pickup_lib.name %]
+
+[% END %]
+
+You can log in and manage your holds at http://gapines.org/login or contact your library for more information.
+
+Please do not respond to this email. This notice was sent from an address that cannot accept incoming mail.
+
+Hold ready for pickup SMS:
+
+[%- USE date -%]
+[%- user = target.0.usr -%]
+From: [%- params.sender_email || default_sender %]
+To: [%- params.recipient_email || helpers.get_sms_gateway_email(target.0.sms_carrier,target.0.sms_notify) %]
+Subject: [% target.size %] hold(s) ready for pickup
+
+[% FOR hold IN target %][%-
+ bibxml = helpers.xml_doc( hold.current_copy.call_number.record.marc );
+ title = "";
+ FOR part IN bibxml.findnodes('//*[@tag="245"]/*[@code="a"]');
+ title = title _ part.textContent;
+ END;
+ author = bibxml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
+%][% title %] / [% author %] @ [% hold.pickup_lib.name %]
+[% END %]
+
+
+PINES Preminders:
+
+[%- USE date -%]
+[%- SET user = circ_list.0.usr -%]
+[%- SET lib = circ_list.0.circ_lib -%]
+To: [% user.email %]
+From: [% smtp_sender %]
+Reply-To: [% smtp_sender %]
+Errors-To: [% smtp_sender %]
+Subject: Courtesy Notice
+
+[% user.first_given_name %] [% user.family_name %],
+
+[%- return_date = parse_due_date(circ_list.0) -%]
+
+This is a courtesy reminder from the library that the following item(s) will be due on : [% date.format(return_date, '%A, %B %d, %Y') %]
+
+[% FOREACH circ = circ_list %]
+ [% get_bib_attr(circ, 'title') %], by [% get_bib_attr(circ, 'author') %]
+ Call Number: [% circ.target_copy.call_number.label %]
+ [%- SET due_date = parse_due_date(circ) %]
+ Due Date: [% date.format(due_date, '%m-%d-%Y') %]
+ Barcode: [% circ.target_copy.barcode %]
+[% END %]
+
+You may request renewal online at http://gapines.org/login, or by contacting your library:
+
+[% lib.name %]
+[%- SET addr = lib.mailing_address -%]
+[%- IF !addr -%] [%- SET addr = lib.billing_address -%] [%- END %]
+[% lib.mailing_address.street1 %] [% lib.mailing_address.street2 %]
+[% lib.mailing_address.city %], [% lib.mailing_address.state %]
+[% lib.mailing_address.post_code %]
+[% lib.phone %]
+
+[Note: Not all items can be renewed. Items returned after the due date may be subject to fines.]
+
+Please do not reply to this message. This notice was sent from an address that cannot accept incoming mail.
+
+Password Reset notification:
+
+
+[%- USE date -%]
+[%- user = target.usr -%]
+To: [%- params.recipient_email || user.email %]
+From: [%- params.sender_email || user.home_ou.email || default_sender %]
+Subject: Library account password reset request
+
+You have received this message because you, or somebody else, requested a reset of your library system password. If you did not request a reset of your library system password, you may ignore this message and your current password will continue to work.
+
+To reset your password:
+
+1. Go to https://[% params.hostname %]/eg/opac/password_reset/[% target.uuid %]
+
+2. Complete the password reset form.
+
+If you need further assistance, please contact your library at [% user.home_ou.phone %].
+
+Please do not reply to this message. This notice was sent from an address that cannot accept incoming mail.
+
+
+SMS Call Number:
+
+[%- USE date -%]
+From: [%- params.sender_email || default_sender %]
+To: [%- params.recipient_email || helpers.get_sms_gateway_email(user_data.sms_carrier,user_data.sms_notify) %]
+Subject: Call Number
+
+[%-
+ bibxml = helpers.xml_doc( target.record.marc );
+ title = "";
+ FOR part IN bibxml.findnodes('//*[@tag="245"]/*[@code="a" or @code="b"]');
+ title = title _ part.textContent;
+ END;
+ author = bibxml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
+%]
+[%- IF title %]
+Title: [% title %]
+[%- END %]
+[%- IF author %]
+Author: [% author %]
+[%- END %]
+Call Number: [% target.label %]
+Location: [% helpers.get_most_populous_location( target.id ).name %]
+Library: [% target.owning_lib.name %]
+