mirror of
https://github.com/webmin/webmin.git
synced 2026-01-14 03:11:35 +00:00
Properly respect the global notification address
This commit is contained in:
@ -118,12 +118,14 @@ if ($out && $dump->{'email'} && &foreign_check("mailboxes")) {
|
||||
# Send the email
|
||||
if (!$ok || !$config{'error_email'}) {
|
||||
# Only send email upon failure, or it requested always
|
||||
&mailboxes::send_text_mail(&mailboxes::get_from_address(),
|
||||
$dump->{'email'},
|
||||
undef,
|
||||
$subject,
|
||||
$data,
|
||||
$config{'smtp_server'});
|
||||
&mailboxes::send_text_mail(
|
||||
&mailboxes::get_from_address(),
|
||||
$dump->{'email'} eq '*' ? $gconfig{'webmin_email_to'}
|
||||
: $dump->{'email'},
|
||||
undef,
|
||||
$subject,
|
||||
$data,
|
||||
$config{'smtp_server'});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@ require './fsdump-lib.pl';
|
||||
&foreign_require("cron", "cron-lib.pl");
|
||||
&ReadParse();
|
||||
|
||||
$wet = $gconfig{'webmin_email_to'};
|
||||
if (!$in{'id'}) {
|
||||
# Adding a new backup of some type
|
||||
$access{'edit'} || &error($text{'dump_ecannot1'});
|
||||
@ -32,7 +33,7 @@ if (!$in{'id'}) {
|
||||
$dump = { 'dir' => $in{'dir'},
|
||||
'fs' => $fs,
|
||||
'rsh' => &has_command("ssh"),
|
||||
'email' => $gconfig{'webmin_email_to'},
|
||||
'email' => $wet ? '*' : undef,
|
||||
$config{'simple_sched'} ?
|
||||
( 'special' => 'daily' ) :
|
||||
( 'mins' => '0',
|
||||
@ -144,7 +145,10 @@ print &ui_table_row(&hlink($text{'edit_enabled'}, "enabled"),
|
||||
|
||||
# Email address to send output to
|
||||
print &ui_table_row(&hlink($text{'edit_email'}, "email"),
|
||||
&ui_textbox("email", $dump->{'email'}, 30), 3, \@tds);
|
||||
$wet ? &ui_opt_textbox("email",
|
||||
$dump->{'email'} eq '*' ? undef : $dump->{'email'},
|
||||
40, &text('edit_email_def', "<tt>$wet</tt>"))
|
||||
: &ui_textbox("email", $dump->{'email'}, 40));
|
||||
|
||||
# Subject line for email message
|
||||
print &ui_table_row(&hlink($text{'edit_subject'}, "subject"),
|
||||
|
||||
@ -128,6 +128,7 @@ edit_savenow=Save and Backup Now
|
||||
edit_createnow=Create and Backup Now
|
||||
edit_return=backup
|
||||
edit_email=Email scheduled output to
|
||||
edit_email_def=Webmin default ($1)
|
||||
edit_subject=Email message subject
|
||||
edit_restore=Restore ..
|
||||
edit_to=$1 to $2
|
||||
|
||||
@ -72,7 +72,7 @@ else {
|
||||
}
|
||||
$dump->{'dir'} = $in{'dir'};
|
||||
$dump->{'fs'} = $in{'fs'};
|
||||
$dump->{'email'} = $in{'email'};
|
||||
$dump->{'email'} = $in{'email_def'} ? '*' : $in{'email'};
|
||||
$dump->{'subject'} = $in{'subject_def'} ? undef : $in{'subject'};
|
||||
if ($access{'extra'}) {
|
||||
$dump->{'extra'} = $in{'extra'};
|
||||
|
||||
Reference in New Issue
Block a user