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