From 1ab1f8d8546fd3afa488879fb9af4afaae408661 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Sat, 10 May 2008 18:43:11 +0100 Subject: [PATCH] Readd signature, and use tabs like the rest of the script --- tools/debianqueued-0.9/debianqueued | 35 +++++++++++++++-------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/tools/debianqueued-0.9/debianqueued b/tools/debianqueued-0.9/debianqueued index 0dd57a4c..c4dec406 100755 --- a/tools/debianqueued-0.9/debianqueued +++ b/tools/debianqueued-0.9/debianqueued @@ -2124,35 +2124,36 @@ sub send_mail($$$) { my $subject = shift; my $text = shift; - my $package = keys %main::packages ? join(' ', keys %main::packages) : ""; + my $package = keys %main::packages ? join(' ', keys %main::packages) : ""; - use Email::Send; - $Email::Send::Sendmail::SENDMAIL = '/usr/sbin/sendmail'; + use Email::Send; + $Email::Send::Sendmail::SENDMAIL = '/usr/sbin/sendmail'; - my $message = <<__MESSAGE__; + my $message = <<__MESSAGE__; To: $addr From: dak\@ftp-master.debian.org Subject: $subject X-Debian: DAK __MESSAGE__ - if (length $package) { - $message .= "X-Debian-Package: $package\n"; - } + if (length $package) { + $message .= "X-Debian-Package: $package\n"; + } - $message .= "\n$text"; + $message .= "\n$text"; + $message .= "\nGreetings,\n\n\tYour Debian queue daemon\n"; - my $mail = Email::Send->new; - for ( qw[Sendmail SMTP] ) { - $mail->mailer($_) and last if $mail->mailer_available($_); - } + my $mail = Email::Send->new; + for ( qw[Sendmail SMTP] ) { + $mail->mailer($_) and last if $mail->mailer_available($_); + } - my $ret = $mail->send($message); - if ($ret && $ret !~ /Message sent|success/) { - return 0; - } + my $ret = $mail->send($message); + if ($ret && $ret !~ /Message sent|success/) { + return 0; + } - return 1; + return 1; } # -- 2.39.5