mirror of
https://github.com/webmin/webmin.git
synced 2025-07-20 16:48:46 +00:00
Respect global default destination address if set
This commit is contained in:
@ -51,9 +51,12 @@ print &ui_table_row($text{'sched_warn'},
|
||||
[ 2, $text{'sched_warn2'} ] ]), 3);
|
||||
|
||||
# Send email to
|
||||
$defmsg = $gconfig{'webmin_email_to'} ?
|
||||
&text('sched_email_def', "<tt>$gconfig{'webmin_email_to'}</tt>") :
|
||||
$text{'sched_none'};
|
||||
print &ui_table_row($text{'sched_email'},
|
||||
&ui_opt_textbox("email", $config{'sched_email'}, 30,
|
||||
$text{'sched_none'}, $text{'sched_email'}), 3);
|
||||
$defmsg, $text{'sched_email'}), 3);
|
||||
|
||||
# From: address
|
||||
print &ui_table_row($text{'sched_from'},
|
||||
|
@ -151,6 +151,7 @@ sched_title=Scheduled Monitoring
|
||||
sched_header=Scheduled background monitoring options
|
||||
sched_mode=Scheduled checking enabled?
|
||||
sched_email=Email status report to
|
||||
sched_email_def=System default ($1)
|
||||
sched_pager=Page status report to number
|
||||
sched_none=Don't send email
|
||||
sched_pnone=Don't send pages
|
||||
|
@ -220,9 +220,12 @@ foreach $serv (@services) {
|
||||
$email .= $thisemail;
|
||||
if ($config{'sched_single'} && $email) {
|
||||
# Force the sending of one email and page per report
|
||||
&send_status_email($email,
|
||||
$config{'subject_mode'} ? $subj : &text('monitor_sub', $subj),
|
||||
$config{'sched_email'});
|
||||
&send_status_email(
|
||||
$email,
|
||||
$config{'subject_mode'} ? $subj :
|
||||
&text('monitor_sub', $subj),
|
||||
$config{'sched_email'} ||
|
||||
$gconfig{'webmin_email_to'});
|
||||
undef($email);
|
||||
if ($pager_msg) {
|
||||
&send_status_pager($pager_msg);
|
||||
@ -274,11 +277,12 @@ foreach $serv (@services) {
|
||||
|
||||
# Send the email and page with all messages, if necessary
|
||||
if ($ecount && !$config{'sched_single'}) {
|
||||
&send_status_email($email,
|
||||
$config{'subject_mode'} ? $text{'monitor_sub2'} :
|
||||
$ecount == 1 ? &text('monitor_sub', $subj) :
|
||||
&text('monitor_sub3', $ecount),
|
||||
$config{'sched_email'});
|
||||
&send_status_email(
|
||||
$email,
|
||||
$config{'subject_mode'} ? $text{'monitor_sub2'} :
|
||||
$ecount == 1 ? &text('monitor_sub', $subj) :
|
||||
&text('monitor_sub3', $ecount),
|
||||
$config{'sched_email'} || $gconfig{'webmin_email_to'});
|
||||
}
|
||||
if ($pager_msg && !$config{'sched_single'}) {
|
||||
&send_status_pager($pager_msg);
|
||||
|
Reference in New Issue
Block a user