Bugzilla – Attachment 31934 Details for
Bug 9530
Allow separate 'Reply To' and 'From' email address for notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 9530 Making changes to misc/cronjobs/runreport.pl
PASSED-QA-Bug-9530-Making-changes-to-misccronjobsr.patch (text/plain), 2.70 KB, created by
Martin Renvoize (ashimema)
on 2014-09-30 06:32:29 UTC
(
hide
)
Description:
[PASSED QA] Bug 9530 Making changes to misc/cronjobs/runreport.pl
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2014-09-30 06:32:29 UTC
Size:
2.70 KB
patch
obsolete
>From e40fa765aa3829ead29342542a54bfd0f2feeb2d Mon Sep 17 00:00:00 2001 >From: Chris Cormack <chrisc@catalyst.net.nz> >Date: Tue, 12 Aug 2014 10:18:47 +1200 >Subject: [PATCH] [PASSED QA] Bug 9530 Making changes to > misc/cronjobs/runreport.pl > >Note: mail from this doesnt work in current master, so you may not >be able to test this fully > >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 sending a mail from scheduled reports, note you will need to have the fix > for 12031 applied >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 <oleonard@myacpl.org> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > misc/cronjobs/runreport.pl | 26 +++++++++++++++----------- > 1 file changed, 15 insertions(+), 11 deletions(-) > >diff --git a/misc/cronjobs/runreport.pl b/misc/cronjobs/runreport.pl >index 0725767..6fcd03a 100755 >--- a/misc/cronjobs/runreport.pl >+++ b/misc/cronjobs/runreport.pl >@@ -23,6 +23,7 @@ use warnings; > > use C4::Reports::Guided; # 0.12 > use C4::Context; >+use Koha::Email; > > use Getopt::Long qw(:config auto_help auto_version); > use Pod::Usage; >@@ -266,22 +267,25 @@ foreach my $report_id (@ARGV) { > } > } > if ($email){ >+ my $email = Koha::Email->new(); > my %mail; > if ($format eq 'html') { > $message = "<html><head><style>tr:nth-child(2n+1) { background-color: #ccc;}</style></head><body>$message</body></html>"; >- %mail = ( >- To => $to, >- From => $from, >- 'Content-Type' => 'text/html', >- Subject => encode('utf8', $subject ), >- Message => encode('utf8', $message ) >+ %mail = $email->create_message_headers({ >+ to => $to, >+ from => $from, >+ contenttype => 'text/html', >+ subject => encode('utf8', $subject ), >+ messsage => encode('utf8', $message ) >+ } > ); > } else { >- %mail = ( >- To => $to, >- From => $from, >- Subject => encode('utf8', $subject ), >- Message => encode('utf8', $message ) >+ %mail = $email->create_message_headers ({ >+ to => $to, >+ from => $from, >+ subject => encode('utf8', $subject ), >+ message => encode('utf8', $message ) >+ } > ); > } > $mail{'Auth'} = {user => $username, pass => $password, method => $method} if $username; >-- >1.7.10.4
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 9530
:
30717
|
30718
|
30719
|
30720
|
30721
|
30722
|
30723
|
30724
|
30725
|
30740
|
30741
|
30742
|
30743
|
30760
|
30761
|
30762
|
30763
|
31169
|
31196
|
31926
|
31927
|
31928
|
31929
|
31930
|
31931
|
31932
|
31933
| 31934 |
31935
|
32799