net-snmp/net-snmp-5.9.4-remove-mail-sender.patch

44 lines
1.4 KiB
Diff
Raw Normal View History

diff -urNp a/local/checkbandwidth b/local/checkbandwidth
--- a/local/checkbandwidth 2024-06-21 21:17:01.675417287 +0200
+++ b/local/checkbandwidth 2024-06-21 21:19:40.107746544 +0200
@@ -326,7 +326,6 @@ See the Net-SNMP COPYING file for licens
use JSON;
use Data::Dumper;
-use Mail::Sender;
use SNMP;
use Fcntl ':flock';
@@ -744,19 +743,19 @@ sub send_rate_message($$$$$$) {
sub send_message($$$) {
my ($to, $subject, $text) = @_;
- my $sender = new Mail::Sender { smtp => $opts{'S'} ,
- port => $opts{'P'},
- from => $opts{'F'},
- };
-
- my $status =
- $sender->MailMsg({
- to => $to,
- subject => $subject,
- msg => $text
- });
+# my $sender = new Mail::Sender { smtp => $opts{'S'} ,
+# port => $opts{'P'},
+# from => $opts{'F'},
+# };
+
+ my $status = -1;
+# $sender->MailMsg({
+# to => $to,
+# subject => $subject,
+# msg => $text
+# });
if ($status < 0) {
- Log("Failed to send mail with error code $status: $Mail::Sender::Error");
+ Log("Failed to send mail with error code $status: Mail::Sender is not available");
}
}