mirror of https://github.com/mikaku/Monitorix.git
added support for relay-only MTA (for example Nullmailer)
This commit is contained in:
parent
7562401bc5
commit
7e6f750d96
|
@ -26,7 +26,6 @@ use Monitorix;
|
||||||
use MIME::Lite;
|
use MIME::Lite;
|
||||||
use LWP::UserAgent;
|
use LWP::UserAgent;
|
||||||
use Exporter 'import';
|
use Exporter 'import';
|
||||||
use Switch;
|
|
||||||
our @EXPORT = qw(emailreports_send);
|
our @EXPORT = qw(emailreports_send);
|
||||||
|
|
||||||
sub emailreports_send {
|
sub emailreports_send {
|
||||||
|
@ -201,15 +200,13 @@ EOF
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($config->{method}) {
|
if(lc($config->{method} || "") eq "relay") {
|
||||||
case "smtp" {
|
$msg->send();
|
||||||
$msg->send('smtp', $emailreports->{smtp_hostname},
|
|
||||||
Timeout => 60);
|
} else {
|
||||||
}
|
$msg->send('smtp', $emailreports->{smtp_hostname}, Timeout => 60);
|
||||||
case "relay" {
|
|
||||||
$msg->send();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
logger("\t$myself: to: $to") if $debug;
|
logger("\t$myself: to: $to") if $debug;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue