Avoid generating illegal Envelope-From with sendmail:// transport (#285)

When the ``sender`` function argument is the empty object, vmime
would still attempt to use it at ``sender.getEmail().generate()``,
but that produces just ``@``. As sendmail is called with ``-f @``,
this shows up in postfix's logs as ``<""@>``.
This commit is contained in:
Jan Engelhardt 2023-12-31 15:56:28 +01:00 committed by GitHub
parent 022303bbc9
commit acfc0bbf82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -165,7 +165,7 @@ void sendmailTransport::send(
args.push_back("-i");
args.push_back("-f");
if (!sender.isEmpty()) {
if (sender.isEmpty()) {
args.push_back(expeditor.getEmail().generate());
} else {
args.push_back(sender.getEmail().generate());