projects
/
pve-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
87ff065
)
sendmail: code cleanup
author
Thomas Lamprecht
<t.lamprecht@proxmox.com>
Thu, 29 Oct 2020 14:20:17 +0000
(15:20 +0100)
committer
Thomas Lamprecht
<t.lamprecht@proxmox.com>
Thu, 29 Oct 2020 14:20:21 +0000
(15:20 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/Tools.pm
patch
|
blob
|
blame
|
history
diff --git
a/src/PVE/Tools.pm
b/src/PVE/Tools.pm
index 7d3368393809f7c3c767e7454d9f6f2b3418b2cd..4b445eafa784d526250e7632d93f02158645b8a7 100644
(file)
--- a/
src/PVE/Tools.pm
+++ b/
src/PVE/Tools.pm
@@
-1450,16
+1450,14
@@
sub sendmail {
$mailto = [ $mailto ] if !ref($mailto);
- foreach (@$mailto) {
- die "illegal character in mailto address\n"
- if ($_ =~ $mail_re);
+ for my $to (@$mailto) {
+ die "illegal character in mailto address\n" if $to =~ $mail_re;
}
my $rcvrtxt = join (', ', @$mailto);
$mailfrom = $mailfrom || "root";
- die "illegal character in mailfrom address\n"
- if $mailfrom =~ $mail_re;
+ die "illegal character in mailfrom address\n" if $mailfrom =~ $mail_re;
$author = $author // 'Proxmox VE';