- my ( $template2, $borrowernumber, $cookie ) = get_template_and_user(
- {
- template_name => "opac-sendbasket.tmpl",
- query => $query,
- type => "opac",
- authnotrequired => 1,
- flagsrequired => { borrow => 1 },
- }
+ # if you want to use the KohaAdmin address as from, that is the default no need to set it
+ my %mail = $email->create_message_headers({
+ to => $email_add,
+ replyto => $email_replyto,
+ });
+ $mail{'X-Abuse-Report'} = C4::Context->preference('KohaAdminEmailAddress');
+
+ # Since we are already logged in, no need to check credentials again
+ # when loading a second template.
+ my $template2 = C4::Templates::gettemplate(
+ 'opac-sendbasket.tt', 'opac', $query,