summaryrefslogtreecommitdiff
path: root/lib/JWebmail.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/JWebmail.pm')
-rw-r--r--lib/JWebmail.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/JWebmail.pm b/lib/JWebmail.pm
index 92c5b44..c95e481 100644
--- a/lib/JWebmail.pm
+++ b/lib/JWebmail.pm
@@ -4,7 +4,7 @@ use Mojo::Base Mojolicious;
use Module::Load 'load';
-use JWebmail::Config 'LOGIN_SCHEME';
+use JWebmail::Config qw'LOGIN_SCHEME DATADIR';
use JWebmail::Controller::Webmail;
use JWebmail::Model::ReadMails::QMailAuthuser;
use JWebmail::Model::WriteMails;
@@ -60,6 +60,9 @@ sub startup {
my $write = JWebmail::Model::WriteMails->new($self->config->{model}{write});
$self->helper(send_mail => sub { $write->sendmail($_[1]) });
+ push $self->renderer->paths->@*, DATADIR . '/templates';
+ push $self->static->paths->@*, DATADIR . '/public';
+
$self->validator->add_check(mail_line => \&_mail_line);
$self->validator->add_filter(non_empty_ul => \&_filter_empty_upload);