From a24d91ea089a71eb07ece8ab2d7d286fa833393a Mon Sep 17 00:00:00 2001 From: Stoiko Ivanov Date: Thu, 3 Sep 2020 14:09:45 +0200 Subject: [PATCH] sendmail helper: allow empty display name in from 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 --- 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.39.2