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