aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSawyer <Sawyer@mandriva.org>2005-05-24 14:40:47 +0000
committerSawyer <Sawyer@mandriva.org>2005-05-24 14:40:47 +0000
commit714610027f1b8ab655639af963303630fb7e1818 (patch)
tree2d23504154cb56b9738a4dc1133c3ece788cc8a8 /lib
parenta036d4bd7e338596a71b702344e419abadfb82cc (diff)
downloadmga-youri-submit-714610027f1b8ab655639af963303630fb7e1818.tar
mga-youri-submit-714610027f1b8ab655639af963303630fb7e1818.tar.gz
mga-youri-submit-714610027f1b8ab655639af963303630fb7e1818.tar.bz2
mga-youri-submit-714610027f1b8ab655639af963303630fb7e1818.tar.xz
mga-youri-submit-714610027f1b8ab655639af963303630fb7e1818.zip
LOST
Diffstat (limited to 'lib')
-rw-r--r--lib/Youri/Submit/Reject/Mail.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Youri/Submit/Reject/Mail.pm b/lib/Youri/Submit/Reject/Mail.pm
index c20a832..cee5a19 100644
--- a/lib/Youri/Submit/Reject/Mail.pm
+++ b/lib/Youri/Submit/Reject/Mail.pm
@@ -54,15 +54,19 @@ sub run {
my ($self, $package, $errors, $repository, $target, $define) = @_;
croak "Not a class method" unless ref $self;
+ my $from = $package->get_packager();
my $section = $repository->_get_section($package, $target, $define);
+ # force from adress if defined
+ $from =~ s/<.*>/<$self->{_from}>/ if $self->{_from};
+
my $subject =
($self->{_prefix} ? '[' . $self->{_prefix} . '] ' : '' ) . ($section ? "$section " : '') .
$package->get_revision_name();
my $information = $package->get_information();
my $last_change = $package->get_last_change();
my $author = $last_change->[Youri::Package::CHANGE_AUTHOR] if $last_change;
- my $list = join('', map { "- $_\n" } @{$last_change->[Youri::Package::CHANGE_TEXT]}) if $last_change;
+ my $list = map { "- $_\n" } @{$last_change->[Youri::Package::CHANGE_TEXT]} if $last_change;
my $content =
"Errors: \n\n" . join("\n", map {
( "* $_", (map { " - $_" } @{$errors->{$_}}), "\n");
@@ -80,7 +84,7 @@ sub run {
Type => 'text/plain',
Charset => $self->{_charset},
Encoding => $self->{_encoding},
- From => $self->{_from},
+ From => $from,
To => $self->{_to},
Subject => $subject,
Data => $content,