From: Chris Cormack Date: Mon, 11 Aug 2014 22:18:12 +0000 (+1200) Subject: Bug 9530 making changes to basket/sendbasket.pl X-Git-Tag: v3.18.00-beta~330 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=49fee3a72d22ce4982ceac7ba047fb43d547d538;p=srvgit Bug 9530 making changes to basket/sendbasket.pl To Test 1/ Edit the new systempreferences (ReplytoDefault and ReturnpathDefault) 2/ Optionally edit the branch the mail will be sent from, adding email addresses 3/ Test some mails, test sending a cart email from the staff client 4/ Check that the mails have the correct From, Replyto and ReturnPath set The rules are If the values are set in the branch use that, else use the syspref Signed-off-by: Owen Leonard Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- diff --git a/basket/sendbasket.pl b/basket/sendbasket.pl index 3ac41708a7..a9314a3d3c 100755 --- a/basket/sendbasket.pl +++ b/basket/sendbasket.pl @@ -30,6 +30,7 @@ use C4::Items; use C4::Auth; use C4::Output; use C4::Biblio; +use Koha::Email; my $query = new CGI; @@ -50,13 +51,9 @@ my $email_sender = $query->param('email_sender'); my $dbh = C4::Context->dbh; if ( $email_add ) { - my $email_from = C4::Context->preference('KohaAdminEmailAddress'); + my $email = Koha::Email->new(); + my %mail = $email->create_message_headers({ to => $email_add }); my $comment = $query->param('comment'); - my %mail = ( - To => $email_add, - From => $email_from - ); - my ( $template2, $borrowernumber, $cookie ) = get_template_and_user( { template_name => "basket/sendbasket.tt",