diff options
-rw-r--r-- | extensions/LimitedEmail/Config.pm | 2 | ||||
-rw-r--r-- | extensions/LimitedEmail/Extension.pm | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/extensions/LimitedEmail/Config.pm b/extensions/LimitedEmail/Config.pm index 026398edb..ea05f363c 100644 --- a/extensions/LimitedEmail/Config.pm +++ b/extensions/LimitedEmail/Config.pm @@ -19,6 +19,4 @@ use constant FILTERS => [ qr/^reed\@reedloden\.com$/i, ]; -use constant MAIL_LOG => 'data/mail.log'; - __PACKAGE__->NAME; diff --git a/extensions/LimitedEmail/Extension.pm b/extensions/LimitedEmail/Extension.pm index f2020a6cc..35cc83567 100644 --- a/extensions/LimitedEmail/Extension.pm +++ b/extensions/LimitedEmail/Extension.pm @@ -14,6 +14,7 @@ our $VERSION = '2'; use FileHandle; use Date::Format; use Encode qw(encode_utf8); +use Bugzilla::Constants qw(bz_locations); sub mailer_before_send { my ($self, $args) = @_; @@ -27,7 +28,8 @@ sub mailer_before_send { $header->header_set(to => ''); } - my $fh = FileHandle->new('>>' . Bugzilla::Extension::LimitedEmail::MAIL_LOG); + my $log_filename = bz_locations->{'datadir'} . '/mail.log'; + my $fh = FileHandle->new(">>$log_filename"); if ($fh) { print $fh encode_utf8(sprintf( "[%s] %s%s %s : %s\n", |