UI for setting real name for from address

https://github.com/webmin/webmin/issues/2600
This commit is contained in:
Jamie Cameron
2025-12-14 15:13:56 -08:00
parent 018ad0062b
commit e88d16a888
3 changed files with 5 additions and 1 deletions

View File

@@ -64,7 +64,9 @@ $fromdef = "webmin-noreply\@".&mailboxes::get_from_domain();
print &ui_table_row($text{'sendmail_from'},
&ui_opt_textbox("from", $from, 40,
&text('sendmail_fromdef', $fromdef)."<br>",
$text{'sendmail_fromaddr'}));
$text{'sendmail_fromaddr'})." ".
$text{'sendmail_name'}." ".
&ui_textbox("from_name", $mconfig{'webmin_from_name'}, 30), 3);
# Default to address for notifications
$to = $gconfig{'webmin_email_to'};

View File

@@ -1105,6 +1105,7 @@ sendmail_authdef=Default (currently Cram-MD5)
sendmail_from=From address for email from Webmin
sendmail_fromdef=Default ($1)
sendmail_fromaddr=Address
sendmail_name=Display name
sendmail_toaddr=Default destination address for notifications
sendmail_to_def=None set
sendmail_etoaddr=Missing or incorrectly formatted destination address

View File

@@ -63,6 +63,7 @@ else {
$in{'from'} =~ /^\S+$/ || &error($text{'sendmail_efrom'});
$mconfig{'webmin_from'} = $in{'from'};
}
$mconfig{'webmin_from_name'} = $in{'from_name'};
# Save to address
if ($in{'to_def'}) {