From: Ansgar Burchardt Date: Sat, 16 May 2015 09:17:52 +0000 (+0200) Subject: debianqueued: switch to Email::Sender X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=dcafe1e024c63a54db7aa2630772992b41e80af5;p=dak.git debianqueued: switch to Email::Sender Email::Send is deprecated and not part of Debian 8 (Jessie). --- diff --git a/tools/debianqueued-0.9/debianqueued b/tools/debianqueued-0.9/debianqueued index 5702e5c5..fb91ff8b 100755 --- a/tools/debianqueued-0.9/debianqueued +++ b/tools/debianqueued-0.9/debianqueued @@ -2275,11 +2275,7 @@ sub send_mail($$$) { my $package = keys %main::packages ? join( ' ', keys %main::packages ) : ""; - use Email::Send; - - unless ( defined($Email::Send::Sendmail::SENDMAIL) ) { - $Email::Send::Sendmail::SENDMAIL = $conf::mail; - } + use Email::Sender::Simple; if ($conf::overridemail) { $addr = $conf::overridemail; @@ -2305,17 +2301,7 @@ __MESSAGE__ $message .= "\n$text"; $message .= "\nGreetings,\n\n\tYour Debian queue daemon (running on host $main::hostname)\n"; - 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; - } - - return 1; + return Email::Sender::Simple->try_to_send($message); } ## end sub send_mail($$$) #