]> git.proxmox.com Git - pve-common.git/commit
sendmail-helper: only send multipart if necessary
authorStoiko Ivanov <s.ivanov@proxmox.com>
Thu, 3 Sep 2020 12:09:44 +0000 (14:09 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 7 Sep 2020 07:40:25 +0000 (09:40 +0200)
commitb18826ce61e6e2438acc08f05aaa5395bdcd4974
treeceebfeaeff23cc22b40dc45d784b19ee29133180
parent804bc6219b2b6e6a4c717b8ea1dffd3a15debddf
sendmail-helper: only send multipart if necessary

PVE::Tools::sendmail currently always sends a multipart/alternative message
irrespective of the actual content of the mail (e.g. a plain-text only mail
need not be sent as multipart message).

Additionally a few small refactorings based on the discussion
in https://lists.proxmox.com/pipermail/pbs-devel/2020-August/000423.html
and commited in 66004f22c6475ceb0146cf2df1f380f9f0274be4 in the
rust proxmox repository git://git.proxmox.com/git/proxmox.git
were carried over.

tested by creating a backup of a VM and setting an e-mail address, having
ha-manager send a mail after fencing as well as sending a few small mails via
'perl -e'

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
src/PVE/Tools.pm