X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/781c16772f3c80cc827f11815bfb07b8318621f0..58a37f869ea279f8cd5cfd15749df5034e5f8698:/SL/BackgroundJob/SelfTest.pm diff --git a/SL/BackgroundJob/SelfTest.pm b/SL/BackgroundJob/SelfTest.pm index 37a02eb94..514562590 100644 --- a/SL/BackgroundJob/SelfTest.pm +++ b/SL/BackgroundJob/SelfTest.pm @@ -11,6 +11,7 @@ use Sys::Hostname; use FindBin; use SL::DB::AuthUser; +use SL::DB::Default; use SL::Common; use Rose::Object::MakeMethods::Generic ( @@ -123,7 +124,7 @@ sub _send_email { my ($output, $content_type) = $self->_prepare_report; - my $mail = Mailer->new(charset => $::locale->is_utf8 ? 'UTF-8' : Common->DEFAULT_CHARSET ); + my $mail = Mailer->new; $mail->{from} = $self->config->{email_from}; $mail->{to} = $email; $mail->{subject} = $self->config->{email_subject}; @@ -145,14 +146,15 @@ sub _prepare_report { return unless $template; my $email_template = $self->config->{email_template}; - my $filename = $email_template || ( ($user->get_config_value('templates') || "templates/mails") . "/self_test/status_mail.txt" ); + my $filename = $email_template || ( (SL::DB::Default->get->templates || "templates/mails") . "/self_test/status_mail.txt" ); my $content_type = $filename =~ m/.html$/ ? 'text/html' : 'text/plain'; my %params = ( SELF => $self, host => hostname, - database => $::myconfig{dbname}, + database => $::auth->client->{dbname}, + client => $::auth->client->{name}, path => $FindBin::Bin, );