Fix scheduled emails being sent to bogus address when no default destination is set
This commit is contained in:
@@ -79,7 +79,7 @@ if (($err || $backup->{'emode'} == 0) && $backup->{'email'}) {
|
|||||||
my $email = $backup->{'email'};
|
my $email = $backup->{'email'};
|
||||||
if ($email eq '*') {
|
if ($email eq '*') {
|
||||||
$email = $gconfig{'webmin_email_to'};
|
$email = $gconfig{'webmin_email_to'};
|
||||||
if ($gconfig{'webmin_email_to_name'}) {
|
if ($email && $gconfig{'webmin_email_to_name'}) {
|
||||||
$email = "$gconfig{'webmin_email_to_name'} <$email>";
|
$email = "$gconfig{'webmin_email_to_name'} <$email>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -119,7 +119,7 @@ if ($out && $dump->{'email'} && &foreign_check("mailboxes")) {
|
|||||||
my $email = $dump->{'email'};
|
my $email = $dump->{'email'};
|
||||||
if ($email eq '*') {
|
if ($email eq '*') {
|
||||||
$email = $gconfig{'webmin_email_to'};
|
$email = $gconfig{'webmin_email_to'};
|
||||||
if ($gconfig{'webmin_email_to_name'}) {
|
if ($email && $gconfig{'webmin_email_to_name'}) {
|
||||||
$email = "$gconfig{'webmin_email_to_name'} <$email>";
|
$email = "$gconfig{'webmin_email_to_name'} <$email>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ if ($tellcount) {
|
|||||||
$emailto = $config{'sched_email'};
|
$emailto = $config{'sched_email'};
|
||||||
if ($emailto eq '*') {
|
if ($emailto eq '*') {
|
||||||
$emailto = $gconfig{'webmin_email_to'};
|
$emailto = $gconfig{'webmin_email_to'};
|
||||||
if ($gconfig{'webmin_email_to_name'}) {
|
if ($emailto && $gconfig{'webmin_email_to_name'}) {
|
||||||
$emailto = "$gconfig{'webmin_email_to_name'} <$emailto>";
|
$emailto = "$gconfig{'webmin_email_to_name'} <$emailto>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user