fixup! add mail-from option
move variable declaration closer to usage
This commit is contained in:
parent
d1f81dc9e4
commit
d2b1a4dfa6
1 changed files with 1 additions and 1 deletions
|
@ -2401,12 +2401,12 @@ sub logger {
|
|||
}
|
||||
sub sendmail {
|
||||
my $recipients = opt('mail');
|
||||
my $sender = opt('mail-from') // '';
|
||||
|
||||
if (opt('mail-failure') && ($result ne 'OK' && $result ne '0')) {
|
||||
$recipients = opt('mail-failure');
|
||||
}
|
||||
if ($emailbody && $recipients && $emailbody ne $last_emailbody) {
|
||||
my $sender = opt('mail-from') // '';
|
||||
pipecmd("sendmail -oi $recipients",
|
||||
"To: $recipients",
|
||||
$sender ne '' ? ("From: $sender") : (),
|
||||
|
|
Loading…
Reference in a new issue