View | Details | Raw Unified | Return to bug 9530
Collapse All | Expand All

(-)a/opac/opac-sendbasket.pl (-10 / +9 lines)
Lines 33-38 use C4::Auth; Link Here
33
use C4::Output;
33
use C4::Output;
34
use C4::Biblio;
34
use C4::Biblio;
35
use C4::Members;
35
use C4::Members;
36
use Koha::Email;
36
37
37
my $query = new CGI;
38
my $query = new CGI;
38
39
Lines 53-73 my $email_sender = $query->param('email_sender'); Link Here
53
my $dbh          = C4::Context->dbh;
54
my $dbh          = C4::Context->dbh;
54
55
55
if ( $email_add ) {
56
if ( $email_add ) {
57
    my $email = Koha::Email->new();
56
    my $user = GetMember(borrowernumber => $borrowernumber);
58
    my $user = GetMember(borrowernumber => $borrowernumber);
57
    my $user_email = GetFirstValidEmailAddress($borrowernumber)
59
    my $user_email = GetFirstValidEmailAddress($borrowernumber)
58
    || C4::Context->preference('KohaAdminEmailAddress');
60
    || C4::Context->preference('KohaAdminEmailAddress');
59
61
60
    my $email_from = C4::Context->preference('KohaAdminEmailAddress');
61
    my $email_replyto = "$user->{firstname} $user->{surname} <$user_email>";
62
    my $email_replyto = "$user->{firstname} $user->{surname} <$user_email>";
62
    my $comment    = $query->param('comment');
63
    my $comment    = $query->param('comment');
63
    my %mail = (
64
64
        To   => $email_add,
65
   # if you want to use the KohaAdmin address as from, that is the default no need to set it
65
        From => $email_from,
66
    my %mail = $email->create_message_headers({
66
    'Reply-To' => $email_replyto,
67
        to => $email_add,
67
#    'X-Orig-IP' => $ENV{'REMOTE_ADDR'},
68
        replyto => $email_replyto,
68
#    FIXME Commented out for now: discussion on privacy issue
69
    });
69
    'X-Abuse-Report' => C4::Context->preference('KohaAdminEmailAddress'),
70
    $mail{'X-Abuse-Report'} = C4::Context->preference('KohaAdminEmailAddress');
70
    );
71
71
72
    my ( $template2, $borrowernumber, $cookie ) = get_template_and_user(
72
    my ( $template2, $borrowernumber, $cookie ) = get_template_and_user(
73
        {
73
        {
74
- 

Return to bug 9530