projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9c42579
)
Change subject for freeside-fetch emailed reports from "subject" to "Freeside report...
author
ivan
<ivan>
Mon, 13 Oct 2008 22:00:50 +0000
(22:00 +0000)
committer
ivan
<ivan>
Mon, 13 Oct 2008 22:00:50 +0000
(22:00 +0000)
FS/FS/Conf.pm
patch
|
blob
|
history
FS/bin/freeside-fetch
patch
|
blob
|
history
diff --git
a/FS/FS/Conf.pm
b/FS/FS/Conf.pm
index
61b4168
..
cbd0385
100644
(file)
--- a/
FS/FS/Conf.pm
+++ b/
FS/FS/Conf.pm
@@
-2467,6
+2467,13
@@
worry that config_items is freeside-specific and icky.
'type' => 'text',
},
'type' => 'text',
},
+ {
+ 'key' => 'email_report-subject',
+ 'section' => '',
+ 'description' => 'Subject for reports emailed by freeside-fetch. Defaults to "Freeside report".',
+ 'type' => 'text',
+ },
+
);
1;
);
1;
diff --git
a/FS/bin/freeside-fetch
b/FS/bin/freeside-fetch
index
89a4f29
..
3fe1a00
100755
(executable)
--- a/
FS/bin/freeside-fetch
+++ b/
FS/bin/freeside-fetch
@@
-40,9
+40,12
@@
foreach my $employee (@employees) {
my $req = new HTTP::Request GET => $url;
my $res = $ua->request($req);
my $req = new HTTP::Request GET => $url;
my $res = $ua->request($req);
+ my $conf = new FS::Conf;
+ my $subject = $conf->config('email_report-subject') || 'Freeside report';
+
my %options = ( 'from' => $email_address,
'to' => $email_address,
my %options = ( 'from' => $email_address,
'to' => $email_address,
- 'subject' =>
'subject'
,
+ 'subject' =>
$subject
,
'body' => $res->content,
);
'body' => $res->content,
);