Am 18.12.2020 um 23:06 schrieb Stefan Küppers <stefanku...@gmail.com>:
Hi , attaching one file to a CMimeMessage works fine.
But when I try to add a secont attachment to a CMimeMessage, no attachment will be inclluded in the resulting file, even the first one is missing.Can you please advice, how more than one part can be added to a CMimeMessage ?
--
Sie erhalten diese Nachricht, weil Sie in Google Groups E-Mails von der Gruppe "libcmime-devel" abonniert haben.
Wenn Sie sich von dieser Gruppe abmelden und keine E-Mails mehr von dieser Gruppe erhalten möchten, senden Sie eine E-Mail an libcmime-deve...@googlegroups.com.
Wenn Sie diese Diskussion im Web verfolgen möchten, rufen Sie https://groups.google.com/d/msgid/libcmime-devel/1b774ced-27fc-4d69-9c44-4d335d50f88en%40googlegroups.com auf.
Hi Alex,
thank you for your response.
Attached you find an example, and it seems that it now works:
Problem was that I called "cmime_message_add_generated_boundary(message);" for each attachment.
However, if I call it only once, it outputs two parts.
// add the attachment
if (num_attachments) {
cmime_message_add_generated_boundary(message);
for (int a=0; a<num_attachments; a++) {
// cmime_message_add_generated_boundary(message);
CMimePart_T *part = cmime_part_new();
cmime_part_from_file(&part,
attachment_list[a], message->linebreak);
if (cmime_message_append_part(message, part) != 0)
{
printf("failed to add mimepart\n");
}
}
}
Best Regards,
Stefan.
Wenn Sie diese Diskussion im Web verfolgen möchten, rufen Sie https://groups.google.com/d/msgid/libcmime-devel/F16F461E-17EC-43A2-912D-F8DE046512E4%40treibsand.com auf.
thank you for your response.
Attached you find an example, and it seems that it now works:Problem was that I called "cmime_message_add_generated_boundary(message);" for each attachment.