fix: should use bodyPart instead of body

This commit is contained in:
saturneric 2024-12-01 18:49:34 +01:00
parent 641913f44a
commit 2cae125f39

View File

@ -451,19 +451,19 @@ auto SignPlainText(int channel, const QString& key,
"application/pgp-signature")); "application/pgp-signature"));
content_type_header_field->setBoundary(body_boundary); content_type_header_field->setBoundary(body_boundary);
auto root_body_part = vmime::make_shared<vmime::body>(); auto root_body_part = vmime::make_shared<vmime::bodyPart>();
auto container_part = vmime::make_shared<vmime::bodyPart>(); auto container_part = vmime::make_shared<vmime::bodyPart>();
auto mime_part = vmime::make_shared<vmime::bodyPart>(); auto mime_part = vmime::make_shared<vmime::bodyPart>();
auto public_key_part = vmime::make_shared<vmime::bodyPart>(); auto public_key_part = vmime::make_shared<vmime::bodyPart>();
auto signature_part = vmime::make_shared<vmime::bodyPart>(); auto signature_part = vmime::make_shared<vmime::bodyPart>();
root_body_part->appendPart(container_part); root_body_part->getBody()->appendPart(container_part);
root_body_part->appendPart(signature_part); root_body_part->getBody()->appendPart(signature_part);
msg->setBody(root_body_part); root_body_part->getBody()->setPrologText(
root_body_part->setPrologText(
"This is an OpenPGP/MIME signed message (RFC 4880 and 3156)"); "This is an OpenPGP/MIME signed message (RFC 4880 and 3156)");
msg->setBody(root_body_part->getBody());
auto container_boundary = vmime::body::generateRandomBoundaryString(); auto container_boundary = vmime::body::generateRandomBoundaryString();
auto container_part_header = container_part->getHeader(); auto container_part_header = container_part->getHeader();
auto container_part_content_ttype_header_field = auto container_part_content_ttype_header_field =