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

(-)a/C4/Letters.pm (-1 lines)
Lines 525-531 sub SendAlerts { Link Here
525
        my $emailsTo = join( ',', @email);
525
        my $emailsTo = join( ',', @email);
526
        my $emailsCC = join( ',', @cc);
526
        my $emailsCC = join( ',', @cc);
527
        my $sendAllEmailsTo = C4::Context->preference('SendAllEmailsTo');
527
        my $sendAllEmailsTo = C4::Context->preference('SendAllEmailsTo');
528
        # some validation.  This could be improved.
529
        if ($sendAllEmailsTo && Email::Valid->address($sendAllEmailsTo) ) {
528
        if ($sendAllEmailsTo && Email::Valid->address($sendAllEmailsTo) ) {
530
            $emailsTo = $sendAllEmailsTo;
529
            $emailsTo = $sendAllEmailsTo;
531
            $emailsCC = '';
530
            $emailsCC = '';
(-)a/basket/sendbasket.pl (-1 / +2 lines)
Lines 31-36 use C4::Auth; Link Here
31
use C4::Output;
31
use C4::Output;
32
use C4::Biblio;
32
use C4::Biblio;
33
use Koha::Email;
33
use Koha::Email;
34
use Email::Valid;
34
35
35
my $query = new CGI;
36
my $query = new CGI;
36
37
Lines 47-53 my ( $template, $borrowernumber, $cookie ) = get_template_and_user ( Link Here
47
my $bib_list     = $query->param('bib_list');
48
my $bib_list     = $query->param('bib_list');
48
my $sendAllEmailsTo = C4::Context->preference('SendAllEmailsTo');
49
my $sendAllEmailsTo = C4::Context->preference('SendAllEmailsTo');
49
my $email_add    = $query->param('email_add');
50
my $email_add    = $query->param('email_add');
50
$email_add = $sendAllEmailsTo if ($sendAllEmailsTo && $sendAllEmailsTo =~ /@/ ); # some validation.  This could be improved.
51
$email_add = $sendAllEmailsTo if ($sendAllEmailsTo && Email::Valid->address($sendAllEmailsTo) );
51
52
52
my $dbh          = C4::Context->dbh;
53
my $dbh          = C4::Context->dbh;
53
54
(-)a/misc/cronjobs/runreport.pl (-1 / +2 lines)
Lines 33-38 use Text::CSV_XS; Link Here
33
use CGI qw ( -utf8 );
33
use CGI qw ( -utf8 );
34
use Carp;
34
use Carp;
35
use Encode;
35
use Encode;
36
use Email::Valid;
36
37
37
use vars qw($VERSION);
38
use vars qw($VERSION);
38
39
Lines 208-214 if ($to or $from or $email) { Link Here
208
    $to   or $to   = C4::Context->preference('KohaAdminEmailAddress');
209
    $to   or $to   = C4::Context->preference('KohaAdminEmailAddress');
209
}
210
}
210
my $sendAllEmailsTo = C4::Context->preference('SendAllEmailsTo');
211
my $sendAllEmailsTo = C4::Context->preference('SendAllEmailsTo');
211
$to = $sendAllEmailsTo if ($sendAllEmailsTo && $sendAllEmailsTo =~ /@/ ); # some validation.  This could be improved.
212
$to = $sendAllEmailsTo if ($sendAllEmailsTo && Email::Valid->address($sendAllEmailsTo) );
212
213
213
unless (scalar(@ARGV)) {
214
unless (scalar(@ARGV)) {
214
    print STDERR "ERROR: No reportID(s) specified\n";
215
    print STDERR "ERROR: No reportID(s) specified\n";
(-)a/opac/opac-sendbasket.pl (-1 / +2 lines)
Lines 34-39 use C4::Output; Link Here
34
use C4::Biblio;
34
use C4::Biblio;
35
use C4::Members;
35
use C4::Members;
36
use Koha::Email;
36
use Koha::Email;
37
use Email::Valid;
37
38
38
my $query = new CGI;
39
my $query = new CGI;
39
40
Lines 49-55 my ( $template, $borrowernumber, $cookie ) = get_template_and_user ( Link Here
49
my $bib_list     = $query->param('bib_list');
50
my $bib_list     = $query->param('bib_list');
50
my $sendAllEmailsTo = C4::Context->preference('SendAllEmailsTo');
51
my $sendAllEmailsTo = C4::Context->preference('SendAllEmailsTo');
51
my $email_add    = $query->param('email_add');
52
my $email_add    = $query->param('email_add');
52
$email_add = $sendAllEmailsTo if ($sendAllEmailsTo && $sendAllEmailsTo =~ /@/ ); # some validation.  This could be improved.
53
$email_add = $sendAllEmailsTo if ($sendAllEmailsTo && Email::Valid->address($sendAllEmailsTo) );
53
54
54
my $dbh          = C4::Context->dbh;
55
my $dbh          = C4::Context->dbh;
55
56
(-)a/opac/opac-sendshelf.pl (-1 / +2 lines)
Lines 34-39 use C4::Output; Link Here
34
use C4::VirtualShelves;
34
use C4::VirtualShelves;
35
use C4::Members;
35
use C4::Members;
36
use Koha::Email;
36
use Koha::Email;
37
use Email::Valid;
37
38
38
my $query = new CGI;
39
my $query = new CGI;
39
40
Lines 49-55 my ( $template, $borrowernumber, $cookie ) = get_template_and_user ( Link Here
49
my $shelfid = $query->param('shelfid');
50
my $shelfid = $query->param('shelfid');
50
my $sendAllEmailsTo = C4::Context->preference('SendAllEmailsTo');
51
my $sendAllEmailsTo = C4::Context->preference('SendAllEmailsTo');
51
my $email   = $query->param('email');
52
my $email   = $query->param('email');
52
$email = $sendAllEmailsTo if ($sendAllEmailsTo && $sendAllEmailsTo =~ /@/ ); # some validation.  This could be improved.
53
$email = $sendAllEmailsTo if ($sendAllEmailsTo && Email::Valid->address($sendAllEmailsTo) );
53
54
54
my $dbh          = C4::Context->dbh;
55
my $dbh          = C4::Context->dbh;
55
56
(-)a/virtualshelves/sendshelf.pl (-2 / +2 lines)
Lines 33-38 use C4::Items; Link Here
33
use C4::Output;
33
use C4::Output;
34
use C4::VirtualShelves;
34
use C4::VirtualShelves;
35
use Koha::Email;
35
use Koha::Email;
36
use Email::Valid;
36
37
37
my $query = new CGI;
38
my $query = new CGI;
38
39
Lines 49-55 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
49
my $shelfid = $query->param('shelfid');
50
my $shelfid = $query->param('shelfid');
50
my $sendAllEmailsTo = C4::Context->preference('SendAllEmailsTo');
51
my $sendAllEmailsTo = C4::Context->preference('SendAllEmailsTo');
51
my $email   = $query->param('email');
52
my $email   = $query->param('email');
52
$email = $sendAllEmailsTo if ($sendAllEmailsTo && $sendAllEmailsTo =~ /@/ ); # some validation.  This could be improved.
53
$email = $sendAllEmailsTo if ($sendAllEmailsTo && Email::Valid->address($sendAllEmailsTo) );
53
54
54
my $dbh = C4::Context->dbh;
55
my $dbh = C4::Context->dbh;
55
56
56
- 

Return to bug 8000