Bugzilla – Attachment 26873 Details for
Bug 12040
Add STMP authentication parameters to runreports.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to add auth params
0001-PATCH-This-patch-adds-three-params-to-allow-for-SMTP.patch (text/plain), 2.75 KB, created by
Chris Nighswonger
on 2014-04-07 15:58:56 UTC
(
hide
)
Description:
Patch to add auth params
Filename:
MIME Type:
Creator:
Chris Nighswonger
Created:
2014-04-07 15:58:56 UTC
Size:
2.75 KB
patch
obsolete
>From acb5484dfa8bea1fddf0777358a192aa962760fb Mon Sep 17 00:00:00 2001 >From: Chris Nighswonger <cnighswonger@foundations.edu> >Date: Mon, 7 Apr 2014 11:55:35 -0400 >Subject: [PATCH] [PATCH] This patch adds three params to allow for SMTP > authentication > >-username -> Username to pass to the SMTP server for authentication > >-password -> Password to pass to the SMTP server for authentication > >-method -> Method is the type of authentication. Ie. LOGIN, DIGEST-MD5, etc. > >See the misc/cronjobs/CONFIGURE.gmail for an example of the use of these params. >--- > misc/cronjobs/runreport.pl | 38 ++++++++++++++++++++++++++++++-------- > 1 file changed, 30 insertions(+), 8 deletions(-) > >diff --git a/misc/cronjobs/runreport.pl b/misc/cronjobs/runreport.pl >index 2357ed8..a1e030f 100755 >--- a/misc/cronjobs/runreport.pl >+++ b/misc/cronjobs/runreport.pl >@@ -1,6 +1,7 @@ > #!/usr/bin/perl > # > # Copyright 2008 Liblime >+# Copyright 2014 Foundations Bible College, Inc. > # > # This file is part of Koha. > # >@@ -89,6 +90,18 @@ Current options are text, html, csv, and tsv. At the moment, text and tsv both p > > Whether to use e-mail (implied by --to or --from). > >+=item B<-username> >+ >+Username to pass to the SMTP server for authentication >+ >+=item B<-password> >+ >+Password to pass to the SMTP server for authentication >+ >+=item B<-method> >+ >+Method is the type of authentication. Ie. LOGIN, DIGEST-MD5, etc. >+ > =item B<-to> > > E-mail address to send report to. Defaults to KohaAdminEmailAddress. >@@ -150,15 +163,23 @@ my $subject = 'Koha Saved Report'; > my $separator = ','; > my $quote = '"'; > >+my $username = undef; >+my $password = undef; >+my $method = 'LOGIN'; >+ > GetOptions( >- 'help|?' => \$help, >- 'man' => \$man, >- 'verbose' => \$verbose, >- 'format=s' => \$format, >- 'to=s' => \$to, >- 'from=s' => \$from, >- 'subject=s' => \$subject, >- 'email' => \$email, >+ 'help|?' => \$help, >+ 'man' => \$man, >+ 'verbose' => \$verbose, >+ 'format=s' => \$format, >+ 'to=s' => \$to, >+ 'from=s' => \$from, >+ 'subject=s' => \$subject, >+ 'email' => \$email, >+ 'username:s' => \$username, >+ 'password:s' => \$password, >+ 'method:s' => \$method, >+ > ) or pod2usage(2); > pod2usage( -verbose => 2 ) if ($man); > pod2usage( -verbose => 2 ) if ($help and $verbose); >@@ -249,6 +270,7 @@ foreach my $report_id (@ARGV) { > Subject => encode('utf8', $subject ), > Message => encode('utf8', $message ) > ); >+ $mail{'Auth'} = {user => $username, pass => $password, method => $method} if $username; > sendmail(%mail) or carp 'mail not sent:' . $Mail::Sendmail::error; > } else { > print $message; >-- >1.8.3.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 12040
:
26872
|
26873
|
26874
|
26875
|
26876
|
26877
|
27016