Change subject for freeside-fetch emailed reports from "subject" to "Freeside report...
authorivan <ivan>
Mon, 13 Oct 2008 22:00:50 +0000 (22:00 +0000)
committerivan <ivan>
Mon, 13 Oct 2008 22:00:50 +0000 (22:00 +0000)
FS/FS/Conf.pm
FS/bin/freeside-fetch

index 61b4168..cbd0385 100644 (file)
@@ -2467,6 +2467,13 @@ worry that config_items is freeside-specific and icky.
     'type'        => 'text',
   },
 
+  {
+    'key'         => 'email_report-subject',
+    'section'     => '',
+    'description' => 'Subject for reports emailed by freeside-fetch.  Defaults to "Freeside report".',
+    'type'        => 'text',
+  },
+
 );
 
 1;
index 89a4f29..3fe1a00 100755 (executable)
@@ -40,9 +40,12 @@ foreach my $employee (@employees) {
   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,
-                  'subject'          => 'subject',
+                  'subject'          => $subject,
                   'body'             => $res->content,
                 );