[pve-devel] [PATCH common v2 2/2] sendmail helper: allow empty display name in from
Stoiko Ivanov
s.ivanov at proxmox.com
Thu Sep 3 14:09:45 CEST 2020
This patch enables the sendmail helper sub to send emails with a non-existant
display name in the from address. This is used to replace the direct call to
the sendmail binary in pve-manager/PVE/API2/APT.pm.
Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
src/PVE/Tools.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm
index 3b5b199..e04b504 100644
--- a/src/PVE/Tools.pm
+++ b/src/PVE/Tools.pm
@@ -1457,7 +1457,7 @@ sub sendmail {
die "illegal character in mailfrom address\n"
if $mailfrom =~ $mail_re;
- $author = $author || 'Proxmox VE';
+ $author = $author // 'Proxmox VE';
open (MAIL, "|-", "sendmail", "-B", "8BITMIME", "-f", $mailfrom, "--", @$mailto) ||
die "unable to open 'sendmail' - $!";
--
2.20.1
More information about the pve-devel
mailing list