From: Stephen Gran Date: Sat, 10 May 2008 17:43:11 +0000 (+0100) Subject: Readd signature, and use tabs like the rest of the script X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ab1f8d8546fd3afa488879fb9af4afaae408661;p=dak Readd signature, and use tabs like the rest of the script --- 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; } #